SpringMVC 學習筆記(九)- 處理 JSON:使用 HttpMessageConverter

1. 處理 JSON 1. 主要步驟 加入 jar 包 編寫目標方法,使其返回 JSON 對應的對象或集合 在方法上添加 @ReponseBody 註解 2. 具體實現 1. 在 SpringMVCTest 中加入 @ResponseBody @RequestMapping("/testJson") public Collection<Employee> testJson(){ retur
相關文章
相關標籤/搜索