Startup report: no relevant entity class error found
Description: Field usersMapper in com.imooc.impl.UserServiceImpl required a bean of type 'com.imooc.mapper.UsersMapper' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'com.imooc.mapper.UsersMapper' in your configuration.
The reason is that the package range of the startup class scanning needs to be annotated with the package path corresponding to the error reporting class
import tk.mybatis.spring.annotation.MapperScan; @SpringBootApplication @MapperScan("com.imooc.mapper") public class Application { public static void main(String[] args) { SpringApplication.run(Application.class,args); } }
Similar Posts:
- Two ways to implement Spring Boot’s scanmapper interface class
- Field adminMapper in com.course.service.impl.AdminServiceImpl required a bean of type ‘com.course.mapper.AdminMapper’ that could not be found
- SpringBoot+Mybatis-plus multi-module project startup Error: xxxmapper or basemapper cannot be found
- Springboot + Maven multi module project startup Error: XxxService cannot be found
- Spring cloud uses feignclient to start and report an error
- Error: no bean named xxxxx available [How to Solve]
- [Solved] Error creating bean with name ‘xxxxController’: Unsatisfied dependency expressed through field ‘xxxxService’;
- Solution to the problem of consider defining a bean of type ‘xxx’ in your configuration in spring boot auto injection
- nested exception is org.apache.ibatis.binding.BindingException: Invalid boun
- [Solved] org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type