- 在application.yml中使用了@@读取标签值,报下面的错误
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 5, column 11:
name: @artifactId@
- 解决办法:在模块的pom.xml文件下引入一下配置
<build>
<!--如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置-->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
然后重新启动,即可成功。