JAVA-29231 Move modules inside existing container modules (#15492)

This commit is contained in:
anuragkumawat
2024-01-01 11:27:05 -08:00
committed by GitHub
parent 76bde3ff46
commit 2096eac575
209 changed files with 472 additions and 222 deletions
@@ -0,0 +1,20 @@
package com.baeldung;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.atomic.AtomicLong;
@RestController
public class GreetingController {
private static final String template = "Hello Docker, %s!";
private final AtomicLong counter = new AtomicLong();
@GetMapping("/greeting")
public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(),
String.format(template, name));
}
}