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跟 下的不一致就會出現上面的錯誤

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