小编Doo*_*ind的帖子

Spring Boot似乎找不到存储库

我不确定我的配置有什么问题,但是据我所知它应该是正确的,尽管那个春天宣布没有这样的bean定义。我对以下几点表示赞同:

  • 配置类位于其他所有内容的根包中
  • 该存储库扩展了JpaRepository,因此不需要注释
  • 播放器对象带有“ @Entity”注释
  • 此存储库的pojo根据注释完全映射
  • 没有非Java配置文件
  • 数据库已建立,并使用了正确的凭据。
  • 出于开发目的,Jpa / hibernate设置为“创建-更新”。

这是我完整的调试日志: spring启动日志pastebin

没有调试标志的日志:

2017-06-12 09:34:36.395  INFO 12880 --- [  restartedMain] 
d.a.c.newworlds.NewWorldsApplication     : No active profile set, falling back to default profiles: default
2017-06-12 09:34:36.727  INFO 12880 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@10057b9b: startup date [Mon Jun 12 09:34:36 CEST 2017]; root of context hierarchy
2017-06-12 09:34:38.090  INFO 12880 --- [  restartedMain] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'playerRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; …
Run Code Online (Sandbox Code Playgroud)

java spring maven spring-boot

5
推荐指数
1
解决办法
5923
查看次数

标签 统计

java ×1

maven ×1

spring ×1

spring-boot ×1