SEC-1953: Polish
This commit is contained in:
parent
7412fe0748
commit
4d282cbe0d
|
@ -74,9 +74,7 @@ import org.springframework.util.Assert;
|
|||
*/
|
||||
@Configuration
|
||||
public class GlobalMethodSecurityConfiguration implements ImportAware {
|
||||
@Autowired
|
||||
private ApplicationContext context;
|
||||
@Autowired(required=false)
|
||||
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
||||
@Override
|
||||
public <T> T postProcess(T object) {
|
||||
|
@ -337,6 +335,16 @@ public class GlobalMethodSecurityConfiguration implements ImportAware {
|
|||
.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")
|
||||
private <T> T lazyBean(Class<T> interfaceName) {
|
||||
LazyInitTargetSource lazyTargetSource = new LazyInitTargetSource();
|
||||
|
|
|
@ -49,10 +49,8 @@ import org.springframework.security.web.access.intercept.FilterSecurityIntercept
|
|||
public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer<Filter,WebSecurity> {
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext context;
|
||||
|
||||
@Autowired(required=false)
|
||||
private ObjectPostProcessor<Object> objectPostProcessor = new ObjectPostProcessor<Object>() {
|
||||
@Override
|
||||
public <T> T postProcess(T object) {
|
||||
|
@ -290,6 +288,16 @@ public abstract class WebSecurityConfigurerAdapter implements SecurityConfigurer
|
|||
.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
|
||||
* {@link AuthenticationManagerBuilder} to ensure that it has been fully
|
||||
|
|
Loading…
Reference in New Issue