Hi experts,
To support multi language, I use mvc:interceptors
It works as well as my expectation.Code:<mvc:interceptors> <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> <property name="paramName" value="lang"></property> </bean> </mvc:interceptors>
To post data from UI to server by AJAX, i have this controller:
My controller works, but the body is always emptyCode:@RequestMapping(value = "/something", method = RequestMethod.POST) public void saveData(@RequestBody String body) throws IOException { //do something here }
I don't know why my body is always empty, if I remove the i18n config, my controller work well.
Please tell me why and how to fix this bug.
Thank you.


Reply With Quote