How to return JSON data from spring Controller using @ResponseBody

后端 未结 8 1108
情深已故
情深已故 2020-11-27 04:55

Spring version 4.2.0, Hibernate 4.1.4 Here is my Controller function:

@RequestMapping(value = \"/mobile/getcomp\", method = Req         


        
8条回答
  •  野性不改
    2020-11-27 05:37

    Add the below dependency to your pom.xml:

    
        com.fasterxml.jackson.core
        jackson-databind
        2.5.0
    
    

提交回复
热议问题