Consider renaming one of the beans or enabling overriding by setting

今天开发遇到

Description:

The bean 'propertySourcesPlaceholderConfigurer', defined in class path resource [org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/context/PropertyPlaceholderAutoConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
查询后发现是 在使用spring boot 高版本的 2.1X的时候 出现的问题 

解决方法为  在application.properties  里加上

spring.main.allow-bean-definition-overridinga=true

 

参考下面的 链接https://github.com/alibaba/nacos/issues/452

转载于:https://my.oschina.net/u/3240542/blog/3063449

你可能感兴趣的:(java)