V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sanstones
V2EX  ›  Java

srpingboot 多数据源问题

  •  
  •   sanstones · 2020-05-27 12:10:49 +08:00 · 1891 次点击
    这是一个创建于 1402 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在一次二次开发中,之前用的数据库是 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.

    2 条回复    2020-05-27 13:00:58 +08:00
    chendy
        1
    chendy  
       2020-05-27 12:15:26 +08:00
    Consider defining a bean named 'entityManagerFactory' in your configuration.

    都已经写这么清楚了…
    hantsy
        2
    hantsy  
       2020-05-27 13:00:58 +08:00
    远古时代的代码吧。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5325 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 91ms · UTC 08:12 · PVG 16:12 · LAX 01:12 · JFK 04:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.