sanstones
V2EX  ›  Java

srpingboot 多数据源问题

  •  
  •   sanstones · May 27, 2020 · 2438 views
    This topic created in 2180 days ago, the information mentioned may be changed or developed.

    在一次二次开发中,之前用的数据库是 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 replies    2020-05-27 13:00:58 +08:00
    chendy
        1
    chendy  
       May 27, 2020
    Consider defining a bean named 'entityManagerFactory' in your configuration.

    都已经写这么清楚了…
    hantsy
        2
    hantsy  
       May 27, 2020
    远古时代的代码吧。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2958 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 02:37 · PVG 10:37 · LAX 19:37 · JFK 22:37
    ♥ Do have faith in what you're doing.