JSON client API for spring MVC 3.0

I am looking for a way to create a JSON proxy client within spring.

We will use spring MVC on the server side. We do not like XML because they are excessive and heavy. JSON seems to be an easy and efficient message container for us.

However, I searched and read http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html many times and I did not find any hits to put my spring client in JSON client.

They provided RMI, Http, JAX-WS, SOAP and others. But nothing has to do with the MVC client (which, I think, may be common, since we don't want to write it twice)

RestTemplate looks good, but I'm surprised this is the suggested way to do it in spring 3.0.

+3
source share
2 answers

RestTemplate really the preferred way to access the leisure facilities.

+5
source

I was in the same position as you, browsing through Spring docs to implement a simple client JSON API . As a result, I implemented it myself, since I only need it for a few RPC-like calls to another webapp. IIRC Jax-RS has such an opportunity, so you can invest in its implementation - for my needs this seemed redundant.

All he needs:

, , - JSON.

, , - Spring MVC JSON, JSONP ( ) JQuery (: JSONP , ). - Spring JSON, , JSONP. JSONP - .

0

Source: https://habr.com/ru/post/1779913/


All Articles