问题描述
- application配置如下:
spring:
profiles:
active: @spring.active@
- 使用
@spring.active@
抛出现异常:
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
found character '@' that cannot start any token. (Do not use @ for indentation)
in 'reader', line 3, column 13:
active: @spring.active@
^
解决方案
- 使用 单引号 或者 双引号 将
@spring.active@
括起来
spring:
profiles:
active: "@spring.active@"