SpringBoot自定義屬性配置讀取

概述: SpringBoot讀取配置文件,將配置文件內容注入到Entity或者配置字段中。 將配置文件注入到Entity中 1.在application.yml中自定義配置如下屬性,girl,cupsize,age,content:注意content的內容可以使用$取出來。          2.定義一個Entity,給出set,get方法。加上註解@[email protected](prefi
相關文章
相關標籤/搜索