Jersey w/ Spring 3.0? - spring

I see some are using Jersey w/ Spring. With Spring 3.0 there are now annotations available to make RESTful APIs directly in a controller. Why should I consider using Jersey w/ Spring?

Jersey pros:
comes with specifications JSR 311
reference implementation for JSR 311
Restlet and RESTeasy are other implementations for JSR 311
better tooling (at least on Netbeans)
it is integrated with Spring and Guice
EDIT
A (very nice) Comparison of Spring MVC and JAX-RS

Spring 3 is backwards compatible so you can use Jersey.
What you get is not tying your application to a propietary API.

Related

Are extra reflection configurations needed for custom Spring Boot starter libraries when using Spring Native?

I am in the process of building a set of shared libraries using custom Spring Boot starter auto configuration per guidance from https://docs.spring.io/spring-boot/docs/2.6.7/reference/htmlsingle/#features.developing-auto-configuration. Great feature offered by Spring Boot by the way! My question is that how does Spring Native support these types of custom Spring Boot Starter libraries? Are extra reflection configurations or native hints required? I have been evaluating Spring Native and I am very excited about the performance boost it brings to Spring Boot apps! I am eagerly awaiting Spring Boot 3 GA to be released! Any advice on how Spring Boot 3 and/or Spring Native handles custom Spring Boot starter libraries and if any extra configurations are required will be greatly appreciated!
I reached out to Sébastien Deleuze, one of the members on Spring Native team, and his response to my question is as follows. Thanks Sébastien!
"Spring Native and the upcoming Spring Boot 3 should support this kind of autoconfiguration if they follow certain guidelines, like using #Configuration(proxyBeanMethods=false).
See https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#how-to-contribute-design for more details.
Spring Boot 3 will likely define more clearly the guidelines."

Spring vs JAX-RS

Here, several questions have been asked by many developers about difference between Spring-Rest and JAX-RS.
And, I have also learned that Spring is not following any specification and Spring framework has their own implementation then
Why Spring allows all that Annotations which are supported/used by JAX-RS by default?
Spring does not support JAX-RS annotations. If there is a situation where you think they do, then you are mistaken or it's just a coincidence. Period. If you will add any JAX-RS annotations in my Spring MVC program, nothing will happen. Annotations are just metadata. They are not programs. If Spring does not recognize the metadata, it will ignore it. But if you use a JAX-RS annotation in place of a Spring annotation that is used for the same purpose, respective of their framework, then you will not get the expected Spring behavior. So basically, if you are using Spring MVC, remove any JAX-RS dependencies so you don't mistakenly use them.

writing spring RESTful end point using java 1.4

Is there any way to develop spring based restful end point using jdk1.4(non annotation base approach because java 1.4 won't support) ?
I have oc4j server(oracle application server) version 10.1.3 which supports j2sdk 1.4 and servlet 2.4. I believe I won't be able to deploy a springboot restful web service in my oc4j server because of jdk1.4(minimum java version required for springboot is 1.6)
Yes I agree Spring Boot is not possible for my scenario. I am asking if it is possible to develop spring web-mvc using jdk 1.4 and servlet 2.4 version ?
You may need to use the XML based configurations for initializing spring context. A RESTful application can be built even without using Spring using Jersey or some other JAX-RS implementations, if you are not going to use any Spring capabilities.

Is Spring Rest the implementation of JAX-RS or what implementation does Spring Rest use for REST support?

I know JAX-RS has many implementations like RESTEASY,Jersy,RestLet.But when i use Spring boot project i just need to add Spring-web dependency and i am ready to go for creating REST APIs.I want to know what is the implementation Spring Boot Rest uses to support REST ?
Difference between JAX-RS and Spring Rest
hope that solves your problem or makes it a little clearer.

JAX-RS (RESTEasy, Jersey) + Spring + OSGi

I'm working on transitioning of existing Java application to OSGi service which is using Spring (injections, AOP) and exposes REST API via JAX-RS (RESTEasy in particular). I was looking around on internet on how to make work this combination together, but didn't find any good solution yet.
a) Spring supports OSGi by Blueprint project.
b) RESTEasy integrates with Spring via resteasy-spring plugin. But there is no resteasy-blueprint or anything which could enable OSGi+Spring support for RESTEasy.
c) The same applies to Jersey. You can use it as a bundle or integrate it with spring using jersey-spring plugin. But not both.
Any suggestions?
Thanks!

Resources