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. coreml之通过URL加载模型

    在xcode中使用mlmodel模型,之前说的最简单的方法是将模型拖进工程中即可,xcode会自动生成有关模型的前向预测接口,这种方式非常简单,但是更新模型就很不方便. 今天说下另外一种通过URL加载 ...

  2. Magisk —— 安卓新一代的第三方拓展,systemless模式

    Magisk由宝岛台湾学生 topjohnwu 开发, XDA主贴:https://forum.xda-developers.com/apps/magisk 使用方法:第三方rec刷入zip 介绍: ...

  3. linux操作记录

    cd ~ 是返回根目录cd .. 跳转到上一页cd 目录 是跳转到目录文件 php -i | grep php.ini  是查看php.ini在哪个文件 vi 是查看文件内容,:i 是编辑文件内容 : ...

  4. (三)golang--执行流程分析

    XXX.go--go build XXX.go--XXX.exe XXX.go--go run XXX.go 两种方式的区别:(1)如果我们先编译生成了可执行文件,那么我们可以将该可执行文件拷贝到没g ...

  5. Git恢复之前版本的两种方法reset、revert(图文详解)(转)

    一.问题描述在利用github实现多人合作程序开发的过程中,我们有时会出现错误提交的情况,此时我们希望能撤销提交操作,让程序回到提交前的样子,本文总结了两种解决方法:回退(reset).反做(reve ...

  6. torch_09_DCGAN_注意的细节

    DCGAN github链接:https://github.com/darr/DCGAN DCGAN:1.在一次epoch中,如果第i批的i能够整除every_print,则打印到output文件中( ...

  7. linux下c++如何输入不回显

    #include <stdio.h> #include <termios.h> #include <unistd.h> #include <iostream& ...

  8. C#将运算字符串直接转换成表达式且计算结果

    DataTable dt = new DataTable(); var Result= dt.Compute("1+2*3+2", "");//将运算字符串转换 ...

  9. Bootstrap3-导航条

    1. 定义导航条 <!-- 导航条 navbar --> <div class="navbar nav-bar-default"> <ul class ...

  10. mybatis源码/mybatis执行流程源码解析

    https://www.cnblogs.com/cxiaocai/tag/%E9%9D%A2%E8%AF%95%E9%A2%98/public SqlSession session; public S ...