Switch from deprecated EnableGlobalMethodSecurity to EnableMethodSecurity (#2081)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -14,11 +14,13 @@ import org.eclipse.hawkbit.tenancy.configuration.TenantConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
|
||||
|
||||
/**
|
||||
* Default configuration that is common to all repository implementations.
|
||||
*/
|
||||
@Configuration
|
||||
@EnableMethodSecurity(proxyTargetClass = true, securedEnabled = true)
|
||||
@EnableConfigurationProperties({ RepositoryProperties.class, ControllerPollProperties.class, TenantConfigurationProperties.class })
|
||||
@PropertySource("classpath:/hawkbit-repository-defaults.properties")
|
||||
public class RepositoryDefaultConfiguration {}
|
||||
@@ -67,13 +67,11 @@ import org.springframework.scheduling.annotation.AsyncConfigurer;
|
||||
import org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl;
|
||||
import org.springframework.security.concurrent.DelegatingSecurityContextExecutorService;
|
||||
import org.springframework.security.concurrent.DelegatingSecurityContextScheduledExecutorService;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
|
||||
/**
|
||||
* Spring context configuration required for Dev.Environment.
|
||||
*/
|
||||
@Configuration
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true, mode = AdviceMode.PROXY, proxyTargetClass = false, securedEnabled = true)
|
||||
@EnableConfigurationProperties({ DdiSecurityProperties.class,
|
||||
ArtifactUrlHandlerProperties.class, ArtifactFilesystemProperties.class, HawkbitSecurityProperties.class,
|
||||
ControllerPollProperties.class, TenantConfigurationProperties.class })
|
||||
|
||||
Reference in New Issue
Block a user