Spring: Spring configuration file is loaded position

1. Mito

Here Insert Picture Description

2. Overview

spring boot started, it scans the following location application.propertiesor applicatior.ymlfile as the Spring bootdefault profile

file:./config/
filet:./
classpath:/config
classpath:./

➢ The above is in accordance with the 优先级从高到低order, the location of all files are loaded, 高优先级配置the contents will cover the 低优先级配置content.
➢ We can also configurespring.config.location

Guess you like

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