buguge - Keep it simple,stupid

知识就是力量,但更重要的,是运用知识的能力why buguge?

导航

springboot启动报错:application.yml 里 Do not use @ for indentation in 'reader', line

在进行springboot项目的多环境配置时(pom里profiles配置了多个环境),报错如下:

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.profiles.active@

 

这指的是application.yml里使用了@符号。

 

解决方法1:在profiles中勾选环境之后,点一下 Roload ALL Maven Projects。

 

 解决方法2:执行 mvn clean compile package -DskipTests

 



 

posted on 2018-03-19 09:32  buguge  阅读(1205)  评论(0编辑  收藏  举报