萝卜小木头
2018-06-02 23:33
***************************
APPLICATION FAILED TO START
***************************
Description:
Field girlRepository in com.imooc.controller.GirlController required a bean named 'entityManagerFactory' that could not be found.
Action:
Consider defining a bean named 'entityManagerFactory' in your configuration.
Process finished with exit code 1
https://blog.csdn.net/Julycaka/article/details/80622754?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.control
将girlRepository.findOne(id); 改为 girlRepository.findById(id).orElse(null); 或 girlRepository.findById(id).get();
https://stackoverflow.com/questions/42182426/spring-boot-repository-field-required-a-bean-named-entitymanagerfactory-that直接看这个解答吧,解决了
没有呀,我这是直接用的师兄代码都不行
解决了吗兄弟
是不是girl实体少了@entity注解
Spring Boot进阶之Web进阶
104040 学习 · 393 问题
相似问题