注解 @SuppressWarnings({ "rawtypes", "unchecked" })

@SuppressWarnings 

上述注解是jse提供的注解。作用是屏蔽一些无关紧要的警告。使开发者能看到一些他们真正关心的警告。从而提高开发者的效率

使用的话 是这样suppressWarnings 禁止显示警告

 

  1. @SuppressWarnings({ "rawtypes", "unchecked" })  
  2.     @ResponseBody  
  3.     @RequestMapping(params = "method=getList")  
  4.     public Map getList(CarAddOil obj) {   
  5.         Map map = new HashMap();  
  6.         map.put("list", carAddOilService.getList(obj));  
  7.         map.put("listCount", carAddOilService.getListCount(obj));  
  8.         return map;  
  9.     }  

posted on 2017-06-06 09:38  ceng006  阅读(2527)  评论(0)    收藏  举报

导航