properties配置文件如何使用SpringBoot进行读取-创新互联
这篇文章给大家介绍properties配置文件如何使用Spring Boot进行读取,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。

在SpringApplication类中:
private ConfigurableEnvironment prepareEnvironment(
SpringApplicationRunListeners listeners,
ApplicationArguments applicationArguments) {
// Create and configure the environment
ConfigurableEnvironment environment = getOrCreateEnvironment();
configureEnvironment(environment, applicationArguments.getSourceArgs());
//此处读取
listeners.environmentPrepared(environment);
if (isWebEnvironment(environment)
&& this.webApplicationType == WebApplicationType.NONE) {
environment = convertToStandardEnvironment(environment);
}
return environment;
} 分享题目:properties配置文件如何使用SpringBoot进行读取-创新互联
网页URL:http://www.jxjierui.cn/article/dipsep.html


咨询
建站咨询
