SpringBoot中application.yaml无法使用@@读取pom.xml中标签值的一个解决方法

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文件下写入


    
    
        
            src/main/resources
            true
        
    
    

    
        
            org.springframework.boot
            spring-boot-maven-plugin
        
    

 

你可能感兴趣的:(spring,boot)