springboot报错org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found character '@' t

springboot yml文件@@报错

方案一:此时在pom文件中添加snakeyaml插件。

<dependency>

<groupId>org.yaml</groupId>

<artifactId>snakeyaml</artifactId>

</dependency>

方案二:idea工具打开file-settings-plugins中搜索yaml。安装yaml插件也可以

           springboot yml文件@@报错

当项目使用maven打成war包放在tomcat下是没有问题的。只是开发者采用springboot启动会报这种问题。

相关文章: