Spring: Spring profile multi-environment support

1. Mito

Here Insert Picture Description

2. Overview

Spring Profile is configured to provide different functions to different environments to support, through activation of fast switching, the specified parameters, etc.

More than 2.1 Profile file

When writing the main configuration file, the file name can be

application-{profile}.properties/yml
如:
application.properties
application-dev.properties
application-prod.properties

Default application.properties feature

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/105018537