Environment @Value @ConfigurationProperties @Value("${xxx}") environment.getProperty("xxx") 读取配置文件 @PropertySource(value = "classpath:config.properties", ignoreResourceNotFound = true,encoding = "UTF-8" )