Simple Java Spring boot web server Using curl to preview the response: ❯ curl localhost:8080/hello\?name=LearnAWS.io Hello LearnAWS.io! It's 2024-06-19T22:18:38.787292626Z% How to run this? Make sure you have Java & JDK installed in your system Install mvn for managing dependencies Start the spring web server using mvn mvn spring-boot:run Code for GET routes @GetMapping("/") public ResponseEntity<String> welcome() { String body = """ <h1>Welcome to Spring boot</h1> <p>Made by <a href='https://learnaws.io'>LearnAWS.io</a> """; return ResponseEntity.ok().header("Content-Type", "text/html").body(body); } @GetMapping("/hello") public String hello(@RequestParam(value = "name", defaultValue = "World") String name) { return String.format("Hello %s! It's %s", name, Instant.now()); }