欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

springboot yml配置文件使用@project.xxxx@啟動報錯Do not use @ for indentation問題

 更新時間:2024年07月15日 14:30:11   作者:jyyy1990  
這篇文章主要介紹了springboot yml配置文件使用@project.xxxx@啟動報錯Do not use @ for indentation問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教

yml配置文件使用@project.xxxx@啟動報錯Do not use @ for indentation

解決方法

在pom.xml的plugings內(nèi)添加

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-resources-plugin</artifactId>
   <configuration>
      <delimiters>@</delimiters>
      <useDefaultDelimiters>false</useDefaultDelimiters>
   </configuration>
</plugin>

然后在pom.xml的build內(nèi)添加

<resources>
   <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
   </resource>
</resources>

這樣就可以在springboot的yml配置文件里引用maven暴露出去的數(shù)值了

.yml文件:

info.groupId: @project.groupId@
info.artifactId: @project.artifactId@
info.version: @project.version@

總結(jié)

以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論