@SuppressWarnings
上述注解是jse提供的注解。作用是屏蔽一些無關緊要的警告。使開發者能看到一些他們真正關心的警告。從而提高開發者的效率
使用的話 是這樣suppressWarnings 禁止顯示警告
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @ResponseBody
- @RequestMapping(params = "method=getList")
- public Map getList(CarAddOil obj) {
- Map map = new HashMap();
- map.put("list", carAddOilService.getList(obj));
- map.put("listCount", carAddOilService.getListCount(obj));
- return map;
- }