Skip to content

Commit 01f9ceb

Browse files
committed
Add another handler method into JsonServiceExporter with jakarta request and response objects
Newer Spring Framework uses jakarta.servlet.http.HttpServletRequest and jakarta.servlet.http.HttpServletResponse objects from the jakarta.* namespace. If JsonRpcServer is registered with @AutoJsonRpcServiceImpl in newer Spring Framework, then request fail due to missing method in a web handler. Newer org.springframework.web.HttpRequestHandler has a signature with jakarta objects, and if JsonServiceExporter has a method with same signature, then it can work with newer Spring MVC.
1 parent 59ff0c9 commit 01f9ceb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/googlecode/jsonrpc4j/spring/JsonServiceExporter.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ public void handleRequest(HttpServletRequest request, HttpServletResponse respon
3131
response.getOutputStream().flush();
3232
}
3333

34+
/**
35+
* {@inheritDoc}
36+
*/
37+
public void handleRequest(
38+
jakarta.servlet.http.HttpServletRequest request,
39+
jakarta.servlet.http.HttpServletResponse response
40+
) throws ServletException, IOException {
41+
jsonRpcServer.handle(request, response);
42+
response.getOutputStream().flush();
43+
}
44+
3445
}

0 commit comments

Comments
 (0)