spring prefixjson with responsebody

后端 未结 1 1096
别那么骄傲
别那么骄傲 2021-01-20 02:32

when controller method return is @responsebody , even if i put


          


        
相关标签:
1条回答
  • 2021-01-20 03:00

    JSON in @RequestBody/@ResponseBody is handled by MappingJacksonHttpMessageConverter which is configured in AnnotationMethodHandlerAdapter.messageConverters.

    The easy way to configure it without interference with other features is to create a BeanPostProcessor to intercept creation of AnnotationMethodHandlerAdapter, see, for example, here.

    0 讨论(0)
提交回复
热议问题