- 已关闭。**此问题需要debugging details。当前不接受答案。
编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
3天前关闭。
Improve this question
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentController': Unsatisfied dependency expressed through field 'studentService': Error creating bean with name 'studentService': Unsatisfied dependency expressed through field 'studentRepository': Error creating bean with name 'studentRepository' defined in com.example.demo.repository.StudentRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration:...
我在网上尝试了很多解决方案,我遵循了很多教程中的所有说明,但我总是得到这个错误。当我评论仓库界面时,它消失了。我遵循这个https://www.javatpoint.com/spring-boot-h2-database,我把所有依赖项,如h2和jps和web
1条答案
按热度按时间xyhw6mcr1#
尝试在存储库接口上添加@Repository注解,spring Boot 无法将StudentRepository识别为bean