首页 > 其他分享> > Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasou
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasou
作者:互联网
在做springboot项目区分环境打包时,因为自己手欠,删除了一行代码。导致花了2-3个小时解决问题。特此记录下来。
<!--下面的resources是后来加的,用来指定打包文件--> <resources> <resource> <directory>src/main/resources</directory> <!-- 资源根目录排除各环境的配置,防止在生成目录中多余其它目录 --> <filtering>true</filtering> <excludes> <exclude>application*.yml</exclude> </excludes> </resource> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>application.yml</include> <include>application-${profiles.active}.yml</include> </includes> </resource> </resources>
这个 <include>application.yml</include> 就是被我删掉了。
标签:src,configure,embedded,no,application,main,true,yml,resources 来源: https://www.cnblogs.com/subendong/p/15710750.html