Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RestController
- public class MyRestController {
- @RequestMapping(path = "some/path", method = RequestMethod.POST)
- public StubObject get(@RequestBody StubObject stubObject) throws IOException, InterruptedException {
- ProcessBuilder pb = new ProcessBuilder(stubObject.getParameters());
- Process p = pb.start();
- String result = IOUtils.toString(p.getInputStream(), "UTF-8");
- p.waitFor();
- return new StubObject(result);
- }
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement