[Spring boot] Application properties and configurations
Posted Answer1215
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Spring boot] Application properties and configurations相关的知识,希望对你有一定的参考价值。
We can use different application properties
application.properties:
server.port=9090
application-prod.properties:
server.port=80
application-test.properties:
server.port=9090
We can setup different properties for different env, more about configration can be found here
Run:
-Dspring.profiles.active=test
WIll run test env:
以上是关于[Spring boot] Application properties and configurations的主要内容,如果未能解决你的问题,请参考以下文章
如何 JUnit 测试 Spring-Boot 的 Application.java
Spring boot jsp 和 application.yml
Spring Boot 配置文件application.properties
Spring Boot Common application properties(转载)
使用 spring boot 和 spring-boot-maven-plugin 生成战争时排除 application.properties