Move classpath checks to class member variable
Closes gh-11437
This commit is contained in:
+6
-2
@@ -43,14 +43,18 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
final class WithUserDetailsSecurityContextFactory implements WithSecurityContextFactory<WithUserDetails> {
|
||||
|
||||
private static final boolean reactorPresent = ClassUtils.isPresent("reactor.core.publisher.Mono",
|
||||
WithUserDetailsSecurityContextFactory.class.getClassLoader());
|
||||
private static final boolean reactorPresent;
|
||||
|
||||
private SecurityContextHolderStrategy securityContextHolderStrategy = SecurityContextHolder
|
||||
.getContextHolderStrategy();
|
||||
|
||||
private BeanFactory beans;
|
||||
|
||||
static {
|
||||
reactorPresent = ClassUtils.isPresent("reactor.core.publisher.Mono",
|
||||
WithUserDetailsSecurityContextFactory.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
WithUserDetailsSecurityContextFactory(BeanFactory beans) {
|
||||
this.beans = beans;
|
||||
|
||||
Reference in New Issue
Block a user