zhegui7212 2017-10-20 01:21 采纳率: 0%
浏览 3040
已结题

spring boot使用JPA,不采用 继承,运行报错求大神指导

图片说明![图片说明](https://img-ask.csdn.net/upload/201710/20/1508462407_199217.png)图片说明

目录结构如上图所示,请问我应该怎么配置使用,扫描包需要配置子目录吗?
启动异常如下,求大神指点:
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-10-20 09:19:48.906 ERROR 13288 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
- Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans

Action:

Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.

  • 写回答

4条回答 默认 最新

  • zhegui7212 2017-10-20 03:33
    关注

    都说了不采用 继承JpaRepository,网上全是继承 JpaRepository教程,这个我知道,有大神指教下吗?

    评论

报告相同问题?

悬赏问题

  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试