参考 文档配置集成多数据源启动器
引入pom
配置 yaml
启动后
具体报错为
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2025-03-03 16:26:47.351 ERROR 28956 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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).
Disconnected from the target VM, address: '127.0.0.1:60870', transport: 'socket'
Process finished with exit code 1
动态数据源完整项目看这个:https://center.javablade.com/blade/BladeX-Biz/src/branch/master/blade-service/blade-demo
你再看下有没有配置如下的参数
扫一扫访问 Blade技术社区 移动端