I am using the latest version of Spring. I have to integrate with a third party server of company A. Now, company A has given me this code:
Path("/user")
public class CallBacks {
String hostDB="jdbc:mysql://localhost:3306/matchmove";
String username="root";
String password="password";
@POST
@Path("/add")
// @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response receive(
@FormParam("id") String id,
@FormParam("amount") String amount,
@FormParam("asset_code") String assetCode,
@FormParam("asset_issuer") String assetIssuer,
@FormParam("memo") String memo) throws NumberFormatException, SQLException {
return Response.ok().build();
}
I want to use Spring as the rest of my project is in Spring! Can some one please advice on the following:
@FormParam
?Response.ok().build()
?Thank you
@FormParam
-> @RequestParam
Response.ok
-> ResponseEntity.ok
@PostMapping(value = "/add")
public ResponseEntity receive(@RequestParam("id") String id) {
return ResponseEntity.ok().build();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With