org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next tok
org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token
found character ‘@’ that cannot start any token.
<profile>
<id>预发布环境</id>
<properties>
<package.environment>pre</package.environment>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
在pom里面加了各个环境动态指定,类似上面那样
spring:
profiles:
active: @environment@
然后再yml使用上面指定 假使spring.profiles.active跟 下的不一致就会出现上面的错误
org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next tok的更多相关文章
- org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1
项目启动报错2018-12-21 14:06:24.917 INFO 23472 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refr ...
- SpringCloud报错:Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode
今天在配置eureka集群时,SpringCloud报错如下: Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing ...
- org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping 原因:yml文件格式错误,此文件要求严格要求格式 如节 ...
- 出现异常org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
这是因为yaml的配置文件格式出错导致的异常 原代码,仔细看数据源的配置没有和type的路径一致,而是下一级的目录,所以导致出错 使用shift+tab快捷键向左移动改变下就好了 最后成功运行
- SpringBoot配置文件yml ScannerException: while scanning an alias *
在使用yml编写配置我呢见 management: endpoints: web: base-path: /actuator jmx: exposure: include: * 报了如下错误 解决方案 ...
- [bug] org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2
原因 SpringBoot启动加载yml配置文件出现编码格式错误 参考 https://www.pianshen.com/article/2431144034/
- yml配置文件读取出错 Exception in thread "main" while scanning for the next token found character '\t(TAB)'
这几天在学习springboot的微服务项目,在配置文件方面也想尝试下新的yml配置,就想把原来项目properties写的文件转换成yml试一下(老项目是之前检出在了eclipse里面),结果写好了 ...
- Springboot - java.lang.IllegalStateException: Failed to load property source from location 'classpath:/application.yml'
Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a simple key in 'reader', lin ...
- maven中profiles使用详解
使用的场景 常常遇到一些项目中多环境切换的问题.比如在开发过程中用到开发环境,在测试中使用测试环境,在生产中用生产环境的情况.springboot中提供了 spring.profile.active的 ...
随机推荐
- HTTP协议,到底是什么鬼?
作者 | Jeskson 来源 | 达达前端小酒馆 了解HTTP HTTP是什么呢?它是超文本传输协议,HTTP是缩写,它的全英文名是HyperText Transfer Protocol. 那么什么 ...
- [LeetCode] 37. Sudoku Solver 求解数独
Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy ...
- [LeetCode] 5. Longest Palindromic Substring 最长回文子串
Given a string s, find the longest palindromic substring in s. You may assume that the maximum lengt ...
- ios 信任自签名证书
1. 通过html 网络地址的方式(eg. <a href="172.26.167.82.crt">证书安装</a>)[或者通过邮件附件的方式]2. 设置- ...
- OAuth2.0 自我领悟
grant_type 授权模式 authorization_code 标准的Server授权模式,授权码模式 password 基于用户密码的授权模式,用户密码模式 client_credential ...
- Scala函数式编程实现排序算法
记得<Function Thinking>这本书中提到,现在的编程范式有两类,一类是“命令式编程”,另一类是“函数式编程”,现在我们最常使用的许多语言像c.c++.java都是命令式的,但 ...
- vue系列--vue是如何实现绑定事件
一.前言 vuejs中的事件绑定,使用<v-on:事件名 = 函数名>来完成的,这里函数名是定义在Vue实例中的methods对象中的,Vue实例可以直接访问其中的方法. 二.事件绑定方式 ...
- windows php 下的各个版本的资源下载地址
历史版本: https://windows.php.net/downloads/releases/archives/ 新版本: https://windows.php.net/download/ 找的 ...
- Python【每日一问】37
问: 基础题: 设计一个复利计算函数invest(),它包含三个参数:amount(资金),rate(年利率),time(投资时间). 键盘输入每个参数后,输出结果:返回每一年的资金总额 比如,amo ...
- git 版本(commit) 回退 -- 使用git reset 指令
刚刚提交了三个commit, git reflog显示如下: 最后一个commit在文件末尾加了一行:v3,以此类推: 下面,使用git reset --hard commitID来进行commit回 ...