private final static Map<String,String> map = new HashMap<String, String>(); static {
//高端人才
map.put("025001", "高层次人才");
map.put("025002", "留学人员归国创业");
map.put("025003", "博士后工作站");
map.put("025004", "创新创业基地");
}
if(map.containsKey(pageType)){
logger.info(map.get(pageType));
model.addAttribute("articleTypeName", map.get(pageType));
}
判断传进去的值时候在map里,如果有,拿到key的值