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. window环境下的oracle错误error: 0x7e的解决方法

    今天连接一个Win2008 Server服务端上的一个oracle出现了下面的这些错误 LoadLibraryFromPath: FQ Dll C:\Windows\system\oci.dll is ...

  2. MySQL binlog三种模式

    1.1 Row Level  行模式 日志中会记录每一行数据被修改的形式,然后在slave端再对相同的数据进行修改 优点:在row level模式下,bin-log中可以不记录执行的sql语句的上下文 ...

  3. base62与long的相互转换

    public static class Converter { private static String keys = "0123456789abcdefghijklmnopqrstuvw ...

  4. (十)golang--运算符

    1.算术运算符 + -  * / % ++ -- 使用细节:(1)对于"/"号,整数除和小数除的区别: (2)++和--只能独立使用,即a=a++是不允许的:没有++a和--a:i ...

  5. Debug 路漫漫-11:Python: TypeError: 'generator' object is not subscriptable

    调试程序,出现以下错误: Python: TypeError: 'generator' object is not subscriptable “在Python中,这种一边循环一边计算的机制,称为生成 ...

  6. TF-IDF & CNN

    TF-IDF----------------------------------------------------------------认为一个单词出现的文本频率越小,它区别不同类别的能力就越大, ...

  7. 转 Java jar (SpringBoot Jar)转为win可执行的exe程序

    原文链接:http://voidm.com/2018/12/29/java-jar-transform-exe/打包Jar工程 将java项目打包成jar工程,可以是文章以SpringBoot为例po ...

  8. DFRobot模块物联网演示项目整合

    简介 本文是此次物联网项目的终结篇.本文将演示如何整合之前的文章中的模块和代码,来简单的完成一个物联网项目.最终的实现效果是:利用Iphone手机上的MQTTool App,来获取DHT11的温湿度数 ...

  9. [转帖]超能课堂(210) 笔记本中常说的PL1、PL2到底如何影响CPU性能?

    超能课堂(210)笔记本中常说的PL1.PL2到底如何影响CPU性能? https://www.expreview.com/71943.html 本文约 4070 字,需 7 分钟阅读 (切换至标准版 ...

  10. 《 .NET并发编程实战》阅读指南 - 第12章

    先发表生成URL以印在书里面.等书籍正式出版销售后会公开内容.