application.yaml文件读取不到pom.xml下的标签值,报

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
found character '@' that cannot start any token. (Do not use @ for indentation)
 in 'reader', line 7, column 13:
        active: @spring.profiles.active@

的解决方法 :

在模块的pom.xml文件下写入

<build>   
<!--重要 如果不设置resource 会导致application.yaml中的@@找不到pom文件中的配置-->    
    <resources>       
        <resource>            
            <directory>src/main/resources</directory>
            <filtering>true</filtering>        
        </resource>    
    </resources>
</build>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-09-07
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
相关资源
相似解决方案