10,354 questions
Advice
0
votes
0
replies
53
views
Migrating a lightweight Jersey/Jetty proxy service to Spring Boot 3.5: Best practices?
I’m an intern and I’ve been asked to help migrate a small Java app from Jersey/Jetty to Spring Boot.
The app is not very big. From what I’ve seen so far, it mainly exposes a few REST endpoints and ...
1
vote
1
answer
230
views
Keycloak Admin Client with Resteasy
I am using the latest Version of the Keycloak Admin Client
<dependency>
<!-- provides convenience classes for accessing the keycloak rest api -->
<groupId>org.keycloak</...
0
votes
0
answers
57
views
Providing JerseyTest with Spring Application Context when using configureDeployment method
I am trying to create a JerseyTest setup where a Spring applicationContext is provided to the JerseyTest. I am using Jersey 2.47, Spring 5.3.39 and jersey-spring5.
I am overriding the ...
0
votes
1
answer
99
views
How do I configure jersey and tomcat to automatically convert POJOs to JSON?
As you can see in TestRest.java I am trying to return a POJO in JSON. I would like to configure tomcat and jersey to automatically convert POJOs to JSON in the response. The way it is configured ...
0
votes
1
answer
125
views
Performance degradation after migration from a legacy war to Spring Boot, how to investigate?
I have a legacy java application using jersey 2.x and deployed to tomcat 8. Recently I migrated it to the latest version of spring boot.
The migration went without any issue and all the function tests ...
0
votes
0
answers
66
views
Setting up the validator gives errors Jersey
I am trying to set up the bean validation in my jersey server. I would like to assure that everytime I get an email in this bean it is not null. But with this current setup, everytime jersey tries to ...
0
votes
1
answer
205
views
How can I replace the generated OpenAPI spec in Swagger (JAX-RS + OpenApiResource) with a custom OpenAPI object?
I'm using Swagger with Jersey (JAX-RS) to serve API documentation. I configure Swagger like this:
ResourceConfig swaggerResourceConfig = new ResourceConfig()
.packages("io.swagger.v3.jaxrs2....
0
votes
1
answer
131
views
Inclusion of @FormDataParam annotation(s) results in 400 Bad Request (Jersey 3.1.10, Java 17, Tomcat 10) for multipart/form-data requests
I have an existing REST API (has been around for years now and I'm the original author) which has multiple end-points. I just added a new end-point for uploading files. The end-point method resource ...
0
votes
1
answer
90
views
Jersey client connection reuse with chunked gzip response
I am trying to use a Jersey (3.x) client with ApacheConnector but I observed that in case a chunked gzip response is received. the connection gets closed as soon as the response is read. The ...
0
votes
0
answers
55
views
How to read Form Data in JAX RS response?
Problem: I have to make JAX RS client call for GET HTTP method. But, the response is a Form data. I need help in knowing how to read the response which is of type FormData.
Ex:
ClientConfig config = ...
0
votes
1
answer
96
views
JAX-RS Tomcat 9.0.21 404 – Not Found when accessing resource
I am trying to learn JAX-RS by using JDK 17, Maven 3.9.5, Tomcat 9.0.21. I used the archetype jersey-quickstart-webapp from GlassFish to generate a project.
I simply built the project and deployed the ...
0
votes
0
answers
325
views
OpenAPI Description for Spring Boot 3 (jakarta.ws.rs) project
I have created a spring boot project (spring-boot-starter-parent version 3.4.0) using the IntelliJ IDEA wizard with spring-boot-starter-jersey.
I have created HelloWorldResource:
@Path("/hello-...
0
votes
1
answer
77
views
How do I test a single JAX-RS/Jersey Endpoint using Spring Boot?
This is similar to testing a single controller with @WebMvcTest, except that we'll be using a real web environment instead of a mock environment. See: Testing the Web Layer guide.
We'll start with an ...
1
vote
2
answers
355
views
How do I test a Spring Boot application that uses JAX-RS/Jersey?
This question is based on the Testing the Web Layer guide for Spring Boot:
We'll start with a @SpringBootTest that passes when we use a controller; this is very similar to the example in the guide.
...
0
votes
0
answers
183
views
POST request with Java HTTP Client to Grizzly HTTP server times out
I'm in the process of upgrading our projects to Java21, and here I encountered our grizzly http server is not compatible with Java21 (was using version 3.0.1). Thus I upgraded to 3.0.16 and at least ...