spring boot 除@Value 外,如何獲得配置文件中的內容

配置文件位置: 讀取文件中的內容代碼: Resource resource = new ClassPathResource("/my-application.properties"); Properties properties = PropertiesLoaderUtils.loadProperties(resource); String name = (String) properties.g
相關文章
相關標籤/搜索