惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Latest
Security Latest
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
Spread Privacy
Spread Privacy
P
Proofpoint News Feed
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MyScale Blog
MyScale Blog
T
Tor Project blog
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
P
Privacy & Cybersecurity Law Blog
MongoDB | Blog
MongoDB | Blog
Simon Willison's Weblog
Simon Willison's Weblog
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
小众软件
小众软件
G
GRAHAM CLULEY
P
Privacy International News Feed
AWS News Blog
AWS News Blog
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
人人都是产品经理
人人都是产品经理
S
Schneier on Security
Scott Helme
Scott Helme
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
T
The Exploit Database - CXSecurity.com
Recent Announcements
Recent Announcements
E
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
U
Unit 42
The Register - Security
The Register - Security
S
Securelist
Martin Fowler
Martin Fowler
Project Zero
Project Zero
大猫的无限游戏
大猫的无限游戏
Cisco Talos Blog
Cisco Talos Blog

博客园 - 技术宅home

kali捕获wifi握手包 centos7安装mysql8 【继续教育】选准用好“三支一扶”人员,助力乡村振兴战略 【继续教育】深入学***在长三角一体化发展座谈会的重要讲话精神,推动长三角区域一体化和高质量发展 【继续教育】全球战“疫”斗争中的中国优势、 中国力量、中国担当、中国精神 【继续教育】民法典总则编解读 【继续教育】坚持创新在我国现代化建设全局中的核心地位,把科技自立自强作为国家发展的战略支撑 【继续教育】加快构建完整内需体系,形成国内国际双循环相互促进新格局 redis key过期提醒,实现订单自动取消 查看当前服务器中最占内存的程序 百度智能云之语音技术(自动播报语音) StringRedisTemplate获取redis信息 MySQL规范 微信测试公众号手动发送模板消息 spring-boot-starter-parent 与 spring-boot-dependencies Docker 容器知识点 Docker 常用命令 Docker 镜像知识点 Centos离线下载Aria2 AriaNG bt-tracker自动更新
maven多环境IDEA启动报Do not use @ for indentation错误解决方法
技术宅home · 2019-10-16 · via 博客园 - 技术宅home

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>