Error message
This means that there is already a bean with the same name in springboot, and rewriting this bean is not allowed
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'dataSource', defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Solution:
In application Add the following configuration in properties
: it is allowed to rewrite duplicate beans and overwrite the previous bean
spring.main.allow-bean-definition-overriding=true
Similar Posts:
- [Solved] Springboot Error: Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
- [Solved] Feign Error: The bean ‘xxxxx.FeignClientSpecification’ could not be registered.
- [Solved] Feign Error: ‘xx.FeignClientSpecification’, defined in null, could not be registered.
- How to Solve the login error of Spring + Shiro CacheManager
- Cannot resolve reference to bean ‘entityManagerFactory’ while setting constructor argument
- [Solved] The swagger UI dependency is introduced into spring boot Error
- Spring cloud uses feignclient to start and report an error
- [Solved] springboot Startup Error: Bean with name ‘xxxxService‘ has been injected into other beans
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘deptController’: Unsatisfied dependency expressed through field ‘departmentMapper
- [Solved] Spring introduces the properties variable Error: org.springframework.beans.TypeMismatchException…