-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathA.java
More file actions
28 lines (23 loc) · 674 Bytes
/
A.java
File metadata and controls
28 lines (23 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
@Path("/api/a")
public class ClassAController {
@Inject
ClassBService classBService;
@POST
@Path("/callB")
@Consumes(MediaType.TEXT_PLAIN)
public String callClassB(String request) {
// Chiamare il servizio della Classe B
return "Response from Class B: " + classBService.callClassA(request);
}
@POST
@Path("/postMethod")
@Consumes(MediaType.TEXT_PLAIN)
public String postMethod(String data) {
return "Class A received POST request with data: " + data;
}
}