springboot报错org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found
在yml文件里面使用配置@xxx@
spring:
profiles:
active: @profile.active@
group:
"dev": devDB,devMVC
"pro": proDB,proMVC
只需要在pom文件中加载以下依赖:
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.30</version>
</dependency>
ps: 用aliyun 创建的spring boot项目仍然会报错...
参考文章链接:
springboot报错org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found ... - 简书springboot报错org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next to...https://www.jianshu.com/p/bb8ac8abddc3?tdsourcetag=s_pctim_aiomsg
最后
以上就是重要羽毛最近收集整理的关于Spring boot在yml配置文件中使用@xxx@命名报错的全部内容,更多相关Spring内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复