springboot application.yml 使用@@pom文件配置

這幾天搞了一下mongodb到springboot 在配置我使用了yml的配置文件 在引用pom文件配置時需要進行配置纔可以使用@@

<build>
        <!-- 使用 @@ application.yml 獲取pom文件中的配置  -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
</build>

如果沒有配置指定resources的話 在使用@@獲取pom文件配置的時候就會爆出:

'@' that cannot start any token. (Do not use @ for indentation)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章