org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next tok


org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
found character ‘@’ that cannot start any token.

<profile>
            <id>預發布環境</id>
            <properties>
                <package.environment>pre</package.environment>
            </properties>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
        </profile>

在pom里面加了各個環境動態指定,類似上面那樣

spring:
  profiles:
    active: @environment@

然后再yml使用上面指定 假使spring.profiles.active跟 下的不一致就會出現上面的錯誤


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM