Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-03-10 15:33:32.709 ERROR 5168 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'securityManager', defined in class path resource [org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/jumpower/shirodemo/config/ShiroConfig.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
出现原因:注入bean时名字冲突,相同名字不成功
解决方法在application.properties加上
#当遇到同样名字的时候是否覆盖注册
spring.main.allow-bean-definition-overriding=true