在bootstrap.properties中设置spring.profiles.active = dev,具体使用是application-dev.properties,是无效的,会报Failed to configure a DataSource: 'url' attribute is not specified。。。错误,找了一天才找到问题所在。需要在application.properties中设置该属性。时间全浪费了,记录一下,也给大家提个醒
Spring Boot报错Failed to configure a DataSource: ‘url‘ attribute is not specified
最新推荐文章于 2025-09-25 10:24:56 发布
博主分享了关于在Spring Boot应用中,如何正确配置`spring.profiles.active`的宝贵经验。错误地将`active`设置在application-dev.properties中导致配置失败,提示`url`未指定。实际应在application.properties中设置。避免浪费时间,提供了一个关键提示。

24万+

被折叠的 条评论
为什么被折叠?



