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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog