java - Spring 4 vs Jersey for REST web services -


We are planning to create a new app with version 4.0.6. We use the controller who can return "XML" or "JSON" In the previous project, we have successfully implemented SEST support for Justice to support GAS-RS API, but some articles from senior writers After reading the suggestions, he said that spring is providing very good support.

Some points that really complicate me using Spring Breast support without using JX-RS and jerseys:

  1. How in the spring Being marshaling and unmarshaling MVC?

  2. Is it necessary to use jack-rs for marshaling or unwillingness

  3. If marshaling and unloading If the pitch is automatically controlled by the spring, then it shows how to know about XML Root Elements.

    I am still confused if you prove to be a great support from the Spring Rest, then why do people still go with jersey for the rest? In fact, there is a desire to know more in details.

    If I said something wrong, please ignore it. Explanation with the example is really useful.

    Thanks in advance! D say that both jerseys and spring mvc are great - each project has its own style and strength, however. Also, the stack overflow is not the right place to ask subjective comparisons (your question will be closed very fast). If you are already using Spring for everyone else and do not have required to use JX-RS, then Spring MVC is considered to be the total.

    About the facilities (United Nations) Marshalling, JX-RS is a sample only after all - other libraries can provide similar facilities without applying the same API.

    1. Instead / Writers, Spring MVC (United Nations) Marceling Rest resources Spring MVC handles content interaction and chooses the best available converter for the job (you can write ways to note those types of types of media types they make). No, it is not necessary to use the JX-RS Marshal resources, in fact, the implementation of JX-RS and the Spring MVC third party's serialization library. Use; Therefore, it is not connected to any particular standard.

    2. In its version 4.0.6, Spring supports many with Jackson, XML for Jackson, JAXB for XML and many other Jackson options as Jackson now Is available

    3. To answer your last point, @xml Array Element is a JXAB annotation and is not part of JX-RS.

      For more complete examples with REST in the spring, see (you will find a full example running in 10-15 minutes).

      Again, the final part of your question is quite subjective - jerseys and spring (drawer wizard, play! Framework, etc.) are not only many popular solutions to build comfort services in JVM.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

Matlab: Transfer variable from GUI to Base Workspace and new Variables (Static Workspace, Script, Creating new Variables) -