When springboot is started, it often fails to start. It is found that there are services and serviceimpl with the same name under different packages. It is reasonable to say that there can be classes with the same name under different packages, but it cannot be started. An error is reported
org. springframework. context. annotation. ConflictingBeanDefinitionException: Annotation-specified bean name ‘roleServiceImpl’ for bean class [com.example.service.RoleServiceImpl] conflicts with existing, non-compatible bean definition of same name and class [com.example.roleService.RoleServiceImpl]
Meaning: the class [com. Example. Service. Roleserviceimpl] annotated with bean name ‘roleserviceimpl’ conflicts with the existing incompatible class with the same name [com.Example.Roleservice.Roleserviceimpl].
It turns out that the annotation @service is only used on these two implementation classes. According to the mapping rules, these two services are mapped to roleserviceimpl, which conflicts.
1. change one of the implementation classes to a different name;
2: change one of the annotations to an annotation @service (name = “AAAA”) whose name is non roleserviceimpl.
Start again, OK.
- Solution to the problem of consider defining a bean of type ‘xxx’ in your configuration in spring boot auto injection
- Error: no bean named xxxxx available [How to Solve]
- Idea Error: No provider available from registry 127.0.0.1:2181 for service
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com.southwind.mmall002.service.Impl.ProductCategoryServiceImplTest’:
- SpringBoot+Mybatis-plus multi-module project startup Error: xxxmapper or basemapper cannot be found
- Spring cloud uses feignclient to start and report an error
- Container Cannot Find bean, Field usersMapper in com.imooc.impl.UserServiceImpl required a bean of type ‘com.imooc.mapper.UsersMapper’ that could not be found.
- Error”>[Solved] Spring Set
- [Solved] SpringBoot Startup Error: is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
- [Solved] FDFS Upload Files Error: tracker_query_storage fail, error no: 2, error info: No such file or directo