解决 ‘@‘ that cannot start any token. (Do not use @ for indentation)

解决 ‘@‘ that cannot start any token. (Do not use @ for indentation),第1张

解决 ‘@‘ that cannot start any token. (Do not use @ for indentation)

运行报错如下:

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 11:
        name: @artifactId@
              ^

我的yml配置如下,

spring:
  profiles:
    active: @profileActive@

这个配置一直以来运行的都没问题,直到一天,前一分钟在本地跑的好好的项目,后一分钟再启动的时候忽然报了个错,说ymal文件解析出错了

查阅资料,找到了一种解决方案,就是在terminal中,项目的目录下运行:

mvn spring-boot:run

待它运行结束后,在重新重启一遍项目。就能重启成功了

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/4660149.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-06
下一篇 2022-11-06

发表评论

登录后才能评论

评论列表(0条)

保存