我是靠谱客的博主 重要羽毛,这篇文章主要介绍Spring boot在yml配置文件中使用@xxx@命名报错,现在分享给大家,希望可以做个参考。

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

在yml文件里面使用配置@xxx@

复制代码
1
2
3
4
5
6
spring: profiles: active: @profile.active@ group: "dev": devDB,devMVC "pro": proDB,proMVC

只需要在pom文件中加载以下依赖:

复制代码
1
2
3
4
5
<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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部