diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java index 5bb05bd031..5124a97b9c 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.java @@ -54,6 +54,10 @@ public class HibernateJpaAutoConfiguration extends JpaBaseConfiguration implemen private ClassLoader classLoader; + public HibernateJpaAutoConfiguration() { + this.environment = null; + } + @Override public void setBeanClassLoader(ClassLoader classLoader) { this.classLoader = classLoader; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfiguration.java index eeac2efa09..106a11e4b4 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfiguration.java @@ -82,6 +82,7 @@ import org.springframework.security.web.util.matcher.AnyRequestMatcher; @EnableConfigurationProperties @ConditionalOnClass({ EnableWebSecurity.class }) @ConditionalOnMissingBean(WebSecurityConfiguration.class) +// @ConditionalOnMissingBean(annotation = EnableWebSecurity.class) public class SecurityAutoConfiguration { private static List DEFAULT_IGNORED = Arrays.asList("/css/**", "/js/**", @@ -101,7 +102,8 @@ public class SecurityAutoConfiguration { @Bean @ConditionalOnMissingBean({ IgnoredPathsWebSecurityConfigurerAdapter.class }) - @ConditionalOnBean(annotation = EnableWebSecurity.class) + // @ConditionalOnBean(annotation = EnableWebSecurity.class) + @ConditionalOnBean(WebSecurityConfiguration.class) public SecurityConfigurer ignoredPathsWebSecurityConfigurerAdapter() { return new IgnoredPathsWebSecurityConfigurerAdapter(); }