其他分享
首页 > 其他分享> > org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next tok

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

标签:scanning,scanner,tok,spring,yaml,while,ScannerException
来源: https://www.cnblogs.com/qingmuchuanqi48/p/11853961.html