entry.tacSrcList[0].key=DM
entry.tacSrcList[0].value=1 DM平台数据
entry.tacSrcList[1].key=MIIT
entry.tacSrcList[1].value=2 集团下发数据
entry.tacSrcList[2].key=ETCC
entry.tacSrcList[2].value=3 欧洲型号中心数据
entry.tacSrcList[3].key=WAP
entry.tacSrcList[3].value=4 WAP日志数据
entry.tacSrcList[4].key=TIER
entry.tacSrcList[4].value=5 泰尔实验室数据
entry.tacSrcList[5].key=DBHOUSE
entry.tacSrcList[5].value=6 DBHOUSE网站数据
entry.tacSrcList[6].key=OTHER
entry.tacSrcList[6].value=7 其他来源数据
entry.tacSrcList[7].key=SZ
entry.tacSrcList[7].value=8 山寨
对应的Java POJO
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import java.util.List; @Configuration @ConfigurationProperties(prefix = "entry") @PropertySource(value = "classpath:application.properties",encoding="UTF-8") public class TacSrcListVo { private List<TacSrcVo> tacSrcList; public List<TacSrcVo> getTacSrcList() { return tacSrcList; } public void setTacSrcList(List<TacSrcVo> tacSrcList) { this.tacSrcList = tacSrcList; } }
import lombok.Data; @Data public class TacSrcVo { private String key; private String value; }
调用
@Autowired private TacSrcListVo tacSrcListVo; @GetMapping("/add") public String add(ModelMap mmap) { mmap.put("tacSrcList", tacSrcListVo.getTacSrcList()); return prefix + "/add"; }