mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-27 06:12:27 +00:00
SEC-1953: Polish
This commit is contained in:
parent
7412fe0748
commit
4d282cbe0d
@ -74,9 +74,7 @@ import org.springframework.util.Assert;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class GlobalMethodSecurityConfiguration implements ImportAware {
|
public class GlobalMethodSecurityConfiguration implements ImportAware {
|
||||||
@Autowired
|
|
||||||
private ApplicationContext context;
|
private ApplicationContext context;
|
||||||
@Autowired(required=false)
|
|
||||||
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public <T> T postProcess(T object) {
|
public <T> T postProcess(T object) {
|
||||||
@ -337,6 +335,16 @@ public class GlobalMethodSecurityConfiguration implements ImportAware {
|
|||||||
.fromMap(annotationAttributes);
|
.fromMap(annotationAttributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setApplicationContext(ApplicationContext context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired(required=false)
|
||||||
|
public void setObjectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) {
|
||||||
|
this.objectPostProcessor = objectPostProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private <T> T lazyBean(Class<T> interfaceName) {
|
private <T> T lazyBean(Class<T> interfaceName) {
|
||||||
LazyInitTargetSource lazyTargetSource = new LazyInitTargetSource();
|
LazyInitTargetSource lazyTargetSource = new LazyInitTargetSource();
|
||||||
|
@ -49,10 +49,8 @@ import org.springframework.security.web.access.intercept.FilterSecurityIntercept
|
|||||||
public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer<Filter,WebSecurity> {
|
public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer<Filter,WebSecurity> {
|
||||||
private final Log logger = LogFactory.getLog(getClass());
|
private final Log logger = LogFactory.getLog(getClass());
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ApplicationContext context;
|
private ApplicationContext context;
|
||||||
|
|
||||||
@Autowired(required=false)
|
|
||||||
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
||||||
@Override
|
@Override
|
||||||
public <T> T postProcess(T object) {
|
public <T> T postProcess(T object) {
|
||||||
@ -290,6 +288,16 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
|
|||||||
.httpBasic();
|
.httpBasic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public void setApplicationContext(ApplicationContext context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired(required=false)
|
||||||
|
public void setObjectPostProcessor(ObjectPostProcessor<Object> objectPostProcessor) {
|
||||||
|
this.objectPostProcessor = objectPostProcessor;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delays the use of the {@link AuthenticationManager} build from the
|
* Delays the use of the {@link AuthenticationManager} build from the
|
||||||
* {@link AuthenticationManagerBuilder} to ensure that it has been fully
|
* {@link AuthenticationManagerBuilder} to ensure that it has been fully
|
||||||
|
Loading…
x
Reference in New Issue
Block a user