This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) throws IOException, InterruptedException { | |
String homeDirectory = System.getProperty("user.home"); | |
ProcessBuilder processBuilder = new ProcessBuilder("/bin/sh", "-c", "echo hello"); | |
ProcessBuilder processBuilder2 = new ProcessBuilder("/bin/sh", "-c", "src/script.sh"); | |
// inheritIO() method we see the output of a simple command in the console in our IDE. | |
// use this method when we want to redirect the sub-process I/O to the standard I/O of the current process: | |
processBuilder.inheritIO(); | |
// ProcessBuilder processBuilder = new ProcessBuilder( "node", "-v"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Hidden | |
@GetMapping("/") | |
public ModelAndView redirect(ModelMap model) { | |
// model.addAttribute("attribute", "redirectWithRedirectPrefix"); | |
return new ModelAndView("redirect:/swagger-ui.html", model); | |
} |
![giphy.gif](https://gist.github.com/hurtigcodes/2184b6be47bc1b9d73af96845605b5db/raw/db7885397f3825b526de9e4b63f8f138eea684ae/giphy.gif)