Reputation: 679
Although the spring-property allow-bean-definition-overriding: true
is enabled in the main application.yml, I am getting an Exception. Any clue why?
Application Start
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'httpSessionManager', defined in class path resource [...], could not be registered. A bean with that name has already been defined in URL [...HttpSessionManager.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Test Start
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'metaDataSourceAdvisor' could not be registered. A bean with that name has already been defined and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Upvotes: 0
Views: 1875
Reputation: 11
If you look at the error message, it says:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true.
Make sure your allow-bean-definition-overriding property is under the spring.main element.
Upvotes: 1