尽管在主application.yml中启用了spring-property allow-bean-definition-overriding: true,但我还是得到了一个异常。有什么线索吗?
应用程序启动
***************************
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测试开始
***************************
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发布于 2020-05-05 14:53:51
如果您查看错误消息,它会显示:
考虑重命名其中一个beans或通过设置spring.main.allow-bean-definition-overriding=true.启用覆盖
确保allow-bean-definition-overriding属性位于spring.main元素之下。
https://stackoverflow.com/questions/61607129
复制相似问题