在Dubbo微服务架构中,由于集成的common包包含MybatisPlus和MySQL依赖,但缺少相应的DataSource配置,导致启动时出现'Failed to configure a DataSource: 'url' attribute is not specified'错误。解决方案是在SpringBoot启动配置中排除DataSource扫描,避免报错。
摘要由CSDN通过智能技术生成
一、报错内容
***************************
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 a suitable driver class
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 monitor are currently active).