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跟 下的不一致就会出现上面的错误

posted @ 2019-11-13 22:58  King-DA  阅读(14434)  评论(0编辑  收藏  举报