spring boot 环境变量问题

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 4, column 13:

active: @spring.profiles.active@

添加 以下依赖即可

        <!-- 解决环境变量 can not use @ 问题 -->
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeyaml.version}</version>
        </dependency>
相关推荐
2401_8572979124 分钟前
秋招内推2025-招联金融
java·前端·算法·金融·求职招聘
一 乐28 分钟前
考研论坛平台|考研论坛小程序系统|基于java和微信小程序的考研论坛平台小程序设计与实现(源码+数据库+文档)
java·数据库·学习·考研·微信·小程序·源码
一 乐29 分钟前
租拼车平台|小区租拼车管理|基于java的小区租拼车管理信息系统小程序设计与实现(源码+数据库+文档)
java·数据库·vue.js·微信·notepad++·拼车
xmh-sxh-13141 小时前
如何选择数据库架构
java
jxxchallenger1 小时前
踩坑spring cloud gateway /actuator/gateway/refresh不生效
java·数据库·gateway
远望樱花兔1 小时前
【d59】【Java】【力扣】146.LRU缓存
java·开发语言·算法
Bonne journée1 小时前
‌在Python中,print(f‘‘)是什么?
java·开发语言·python
潘多编程2 小时前
Spring Boot微服务架构设计与实战
spring boot·后端·微服务
2402_857589362 小时前
新闻推荐系统:Spring Boot框架详解
java·spring boot·后端
原机小子2 小时前
Spring Boot框架下的新闻推荐技术
服务器·spring boot·php