当前位置: 代码迷 >> 综合 >> Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found char
  详细解决方案

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found char

热度:54   发布时间:2023-12-12 01:04:20.0

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
在启动即可

  相关解决方案