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
尝试在repository接口上添加@Repository注解,spring boot无法将StudentRepository识别为bean