blade-boot版本配置多数据源

Blade 未结 3 650
ribon
ribon 剑者 2025-01-02 14:41

blade-boot版本我想要配置多个数据库,不是主从库,一个作为项目本身的库,另一个库做其他业务使用

3条回答
  • 2025-01-02 15:00

    那原理还是一样的,可以了解下这个,看看他的文档做集成:https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter


    作者追问:2025-01-02 15:49

    image.png

    这样配置后,启动报错:

    ***************************

    APPLICATION FAILED TO START

    ***************************


    Description:


    Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.


    Reason: Failed to determine suitable jdbc url



    Action:


    Consider the following:

    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.

    If you have database settings to be loaded from a particular profile you may need to activate it (the profiles dev are currently active).



    0 讨论(0)
  • 2025-01-02 16:45

    已搞定,多谢!

    回答: 2025-01-03 14:29

    作者追问:2025-01-03 14:34

    感谢反馈

    0 讨论(0)
  • 2025-01-20 11:03

    你好,我也是同样的启动报错,请问怎么解决了

    0 讨论(1)
代码语言
提交回复