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的更多相关文章

  1. 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 ...

  2. SpringCloud报错:Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing MappingNode

    今天在配置eureka集群时,SpringCloud报错如下: Caused by: org.yaml.snakeyaml.parser.ParserException: while parsing ...

  3. org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping

    org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping 原因:yml文件格式错误,此文件要求严格要求格式 如节 ...

  4. 出现异常org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping

    这是因为yaml的配置文件格式出错导致的异常 原代码,仔细看数据源的配置没有和type的路径一致,而是下一级的目录,所以导致出错 使用shift+tab快捷键向左移动改变下就好了 最后成功运行

  5. SpringBoot配置文件yml ScannerException: while scanning an alias *

    在使用yml编写配置我呢见 management: endpoints: web: base-path: /actuator jmx: exposure: include: * 报了如下错误 解决方案 ...

  6. [bug] org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2

    原因 SpringBoot启动加载yml配置文件出现编码格式错误 参考 https://www.pianshen.com/article/2431144034/

  7. yml配置文件读取出错 Exception in thread "main" while scanning for the next token found character '\t(TAB)'

    这几天在学习springboot的微服务项目,在配置文件方面也想尝试下新的yml配置,就想把原来项目properties写的文件转换成yml试一下(老项目是之前检出在了eclipse里面),结果写好了 ...

  8. 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 ...

  9. maven中profiles使用详解

    使用的场景 常常遇到一些项目中多环境切换的问题.比如在开发过程中用到开发环境,在测试中使用测试环境,在生产中用生产环境的情况.springboot中提供了 spring.profile.active的 ...

随机推荐

  1. loj 6051 「雅礼集训 2017 Day11」PATH - 多项式 - 钩子公式

    题目传送门 传送门 设 $m = \sum_{i = 1}^{n} a_i$. 总方案数显然等于 $\frac{m!}{\prod_{i = 1}^{n} a_i!}$. 考虑这样一个网格图,第 $i ...

  2. 我已经看到了,撤回也没用了(PC微信防撤回补丁)

    前两天看 GitHub 发现一个有趣的项目,PC微信防撤回补丁,本着研究学习的目的,在看过源码,一顿疯狂操作之后,了解了其原理是基于修改 wechatwin.dll 达到防撤回的. 于是乎,自己动手玩 ...

  3. vue 学习注意事项

    一:插值方式: 1:数据绑定,最常见的形式就是使用 “Mustache” 语法(双大括号)的文本插值 <span>Message: {{ msg }}</span>  通过使用 ...

  4. ng使用bootstrap

    1.在项目中使用命令 npm i bootstrap -s来创建bootstrap 2.创建完成之后在 angular.json中引入进去 "styles": [          ...

  5. WPF DataGrid 自定义样式 MVVM 删除 查询

    看到很多小伙伴在找Dategrid样式 就分享一个 ,有不好的地方 请指出 代码部分都加了注释  需要的可以自己修改为自己需要的样式 源码已经上传 地址:  https://github.com/YC ...

  6. java跳出循环break;return;continue使用

    for(int i=0;i<5;i++){ if(i==2){ System.out.println("i==2时忽略了"); continue;//忽略i==2时的循环 } ...

  7. RAID(独立磁盘冗余阵列)简介

    RAID(独立磁盘冗余阵列) 在大数据技术出现之前,人们就需要面对这些关于存储的问题,对应的解决方案就是RAID技术. RAID(独立磁盘冗余阵列)技术主要是为了改善磁盘的存储容量,读写速度,增强磁盘 ...

  8. SSL证书格式转换

    crt格式转pem openssl x509 -in www.x.com.crt -out www.x.com.pem openssl x509 -in mycert.crt -out mycert. ...

  9. python程序设计基础(程序设计基础方法)

    python初学者程序练习题 注:练习题涉及到range()函数的使用方法和python绘制,后面会单独发篇解释说明. 1.字符串拼接.接收用户输入的两个字符串,将它们组合后输出 str1=input ...

  10. sitemap 文件的生成 sitemap文件和sitemapindex 索引文件的生成

    <?php /*****连接数据库 start*******/ $dbhost = "localhost"; $username = "root"; $u ...