srpingboot 多数据源问题

2020-05-27 12:10:49 +08:00
 sanstones

在一次二次开发中,之前用的数据库是 postgres,一切正常 现要新接入新的数据源 希望在不改动之前代码的情况下对新的数据库进行操作 因为 springboot 的自动配置 项目启动不起来 求各位大佬给一个解决方案 小弟不胜感激

报错信息如下: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-05-27 09:30:56,442 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter -


APPLICATION FAILED TO START


Description:

Field relationRepository in org.thingsboard.server.dao.sql.relation.JpaRelationDao required a bean named 'entityManagerFactory' that could not be found.

The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean named 'entityManagerFactory' in your configuration.

1909 次点击
所在节点    Java
2 条回复
chendy
2020-05-27 12:15:26 +08:00
Consider defining a bean named 'entityManagerFactory' in your configuration.

都已经写这么清楚了…
hantsy
2020-05-27 13:00:58 +08:00
远古时代的代码吧。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/675924

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX