• Dave Syer's avatar
    Ensure JPA/Security are not fighting with each other on startup · 1f82ef4d
    Dave Syer authored
    This is *really* nasty (and led me to discover a related bug
    https://jira.spring.io/browse/SPR-11844), but fortunately easy to
    hide from users once you have a test case.
    
    The problem is that Spring Security registers a `BeanPostProcessor`
    to handle `GlobalAuthenticationConfigurerAdapters`, and Boot
    registers a `BeanPostProcessor` to handle injecting the packages
    to scan into an `EntityManagerFactory` from `@EntityScan`. The
    clash comes because the `EntityScanBeanPostProcessor` wants to be
    postprocessed by the Security postprocessor, but if the Security
    configuration depends on JPA it won't be ready in time.
    
    The fix (or workaround) depending on how you look at it is to
    prevent the other bean post processors from taking an interest in
    `EntityScanBeanPostProcessor` at all (mark it as synthetic).
    
    Fixes gh-1008
    1f82ef4d
Name
Last commit
Last update
docs Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
spring-boot-versions Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
README.adoc Loading commit data...
pom.xml Loading commit data...