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)
problem
在spring boot項目中區分dev prod環境配置使用了@符號
spring:
profiles:
active: @profileActive@
報錯:
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)
solution
- mvn clean 后重新啟動
- 將配置加上單引號或雙引號 @profileActive@ => '@profileActive@'