***************************
APPLICATION FAILED TO START
***************************
Description:
Field usuarioDao in es.uc3m.tiw.Controladores.Controlador required a bean named 'entityManagerFactory' that could not be found.
Action:
Consider defining a bean named 'entityManagerFactory' in your configuration.
Because it’s a previous project, now I report an error. It’s said on the Internet to delete the package under hibernate in Maven warehouse, but it’s no use trying it; Later, I wondered if it was the version of springboot
So in the POM. XML file
The version of springboot starts from
<version>2.1.1.RELEASE</version>
Change to
<version>2.1.4.RELEASE</version>
Project ready to run
Another mistake
***************************
APPLICATION FAILED TO START
***************************
Description:
Field roleRepository in top.wujinxing.ch15jpa.controller.RoleController required a bean of type 'top.wujinxing.ch15jpa.dao.RoleRepository' 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 'top.wujinxing.ch15jpa.dao.RoleRepository' in your configuration.
Process finished with exit code 1
You need to add the
@ComponentScan(basePackages = "top.wujinxing.ch15jpa.dao")
Similar Posts:
- Field adminMapper in com.course.service.impl.AdminServiceImpl required a bean of type ‘com.course.mapper.AdminMapper’ that could not be found
- 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.
- Springboot + Maven multi module project startup Error: XxxService cannot be found
- [Solved] Springboot Start main program service error: required a single, but 2 were found
- SpringBoot+Mybatis-plus multi-module project startup Error: xxxmapper or basemapper cannot be found
- [Solved] ShardingJDBC Error: The bean ‘dataSource’, defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class], could not be registered.
- Spring cloud uses feignclient to start and report an error
- [Solved] Springboot Error: Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
- [Solved] The bean ‘sysDictService’ could not be injected because it is a JDK dynamic proxy
- Unit test reports an error nosuchbeandefinitionexception