SpringMVC3 返回JSON数据



 java程序:

	@RequestMapping("/admin/getMemory.do")
	public @ResponseBody OperatingSystemMXBean getMemory(HttpServletRequest request){
		 OperatingSystemMXBean systemMXBean=(OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
		 return systemMXBean;
	}

 springmvc配置:

	
		
			
				
			
		
	
	
		
			
				
			
		
	

 运行效果:

附件提供jar下载

你可能感兴趣的:(SpringMVC3 返回JSON数据)