spring boot 獲取application.properties文件內容

在spring boot中獲取配置文件內容:使用@Value註解web @Value("${key}") private String value; 經過@Value註解變量,在註解中傳參(配置文件的key值),就能夠爲變量賦值對應key的value值spring
相關文章
相關標籤/搜索