found character ‘@‘ that cannot start any token. 解决方案
spring:profiles:active: @spring.profiles.active@用 pom.xml 配合 yaml 文件实现动态配置。项目使用了如上配置,一开始可以运行。但是在某次运行时突然开始报错。Exception in thread "main" while scanning for the next tokenfound character '@' that cannot
·
spring:
profiles:
active: @spring.profiles.active@
用 pom.xml 配合 yaml 文件实现动态配置。
项目使用了如上配置,一开始可以运行。但是在某次运行时突然开始报错。
Exception in thread "main" while scanning for the next token
found character '@' that cannot start any token. (Do not use @ for indentation)
in 'reader', line 3, column 13:
name: @spring.profiles.active@
解决方案是先检查是否在 maven 构建时选择了相应的配置。如果不能解决问题,则在 @@ 两侧加上单引号 ' 或双引号 " 。
spring:
profiles:
active: '@spring.profiles.active@'
更多推荐



所有评论(0)