found character ‘@‘ that cannot start any token. (Do not use @ for indentation) -springboot启动报错

.......
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: @profileActive@
                ^
......

1、改一下active: @profileActive@ 为active: ‘@profileActive@’试试

2、maven重新编译一下,切换配置文件编译一下

3、打开编辑器中项目的下面工具栏以IDEA为例

在这里插入图片描述

执行 mvn spring-boot:run 这个命令

maven会重刷关联启动配置文件,同时maven操作区选择哪个,下面就会加载哪个配置文件启动,等待加载结束

还是这个执行窗口:

CTRL+C按键停止服务,关闭应用进程。

再正常启动一下,验证是不是可以了

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/a0477d09f1.html