Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RestController
- public class ControllerA {
- @RequestMapping(value = "/methodA", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
- public ResponseEntity<String> methodA(@RequestBody String something) {
- // some process
- return null;
- }
- @RestController
- public class ControllerB {
- @RequestMapping(value = "/methodB", consumes = org.springframework.http.MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity<String> methodA(@RequestBody String something) {
- // some process
- return null;
- }
- @RestController
- public class ControllerC {
- public ResponseEntity<String> methodC(@RequestBody String someReq) {
- if (checkPam(someReq)) {
- **// I want to call the ControllerA in serverA.**
- }else {
- **// I want to call the ControllerB in serverB.**
- }
- return null;
- }
Add Comment
Please, Sign In to add comment