Skip to content

Commit

Permalink
Remove the mandatory setting that allows beans to override and circul…
Browse files Browse the repository at this point in the history
…ar references

In Spring Boot 2.1, Bean overriding has been disabled by default to prevent a bean being accidentally overridden.
If you are relying on overriding, you will need to set `spring.main.allow-bean-definition-overriding` to `true`.

In Spring Boot 2.6, Circular references between beans are now prohibited by default.

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.1-Release-Notes#bean-overriding
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes#circular-references-prohibited-by-default

Closes gh-607
  • Loading branch information
rainboyan committed Oct 2, 2024
1 parent 3f8814f commit a5e7b53
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions grace-boot/src/main/groovy/grails/boot/Grails.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ public ConfigurableApplicationContext run(String... args) {
return super.run(args);
}

@Override
protected ConfigurableApplicationContext createApplicationContext() {
setAllowBeanDefinitionOverriding(true);
setAllowCircularReferences(true);

return super.createApplicationContext();
}

@Override
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) {
Environment env = Environment.getCurrent();
Expand Down

0 comments on commit a5e7b53

Please sign in to comment.