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

@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;
	}

你可能感兴趣的:(思路)