码迷,mamicode.com
首页 > 移动开发 > 详细

[Spring boot] Application properties and configurations

时间:2019-01-14 23:04:44      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:class   file   different   out   current   href   tar   env   img   

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

标签:class   file   different   out   current   href   tar   env   img   

原文地址:https://www.cnblogs.com/Answer1215/p/10269168.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!