zoukankan      html  css  js  c++  java
  • maven多环境IDEA启动报Do not use @ for indentation错误解决方法

    maven多环境配置如下:

    <profiles>
            <profile>
                <!--开发环境-->
                <id>dev</id>
                <properties>
                    <profileActive>dev</profileActive>
                </properties>
                <activation>
                    <activeByDefault>true</activeByDefault>
                </activation>
            </profile>
            <profile>
                <!--测试环境-->
                <id>test</id>
                <properties>
                    <profileActive>test</profileActive>
                </properties>
            </profile>
            <profile>
                <!--正式环境-->
                <id>prod</id>
                <properties>
                    <profileActive>prod</profileActive>
                </properties>
            </profile>
    </profiles>

    application.yml使用如下:

    spring:
      profiles:
        active: @profileActive@

    报错如下:

    Caused by: 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 19, column 13:
            active: @profileActive@

    解决方案如下:

    <!--build节点增加内容-->
    <resources>
            <resource>
                    <directory>src/main/resources</directory>
                    <!--开启过滤,用指定的参数替换directory下的文件中的参数-->
                    <filtering>true</filtering>
            </resource>
    </resources>
  • 相关阅读:
    多浏览器CSS样式解决方法
    CSS基础
    HTML页面——常用模块
    CSS选择器
    li水平与div水平
    天梯题目解答——1012、1430
    天梯题目解答——1205、1075、1083、1160
    HTML5 元素拖动
    div简单水平移动效果
    Matlab代码优化--向量化
  • 原文地址:https://www.cnblogs.com/sjshare/p/11685522.html
Copyright © 2011-2022 走看看