intellij spring boot运行无法自动加载application.yml

问题描述 投票:0回答:1

my application.yml locate my application.yml spring boot run server port Intellij spring boot run configuration

你好。我的项目是Intellij spring boot 1.5.7 Gradle Project 当Intellij spring boot运行时无法自动加载application.yml。 但gradle bootRun非常好运行和加载。 请指教我。

java spring-boot intellij-idea
1个回答
0
投票

您应该指定配置文件配置。从您的application.yml,您有多个配置由“---”分隔,这用于不同弹簧配置文件的多个配置文件配置。尝试删除“---”并指定配置文件如下:enter image description here

如果您对不同的配置文件有不同的配置,则使用多个配置,如下所示:enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.