Added a few comments to server java files
This commit is contained in:
@@ -3,9 +3,11 @@ package hello;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
//application to boot with spring
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
//run the application
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ public class GreetingController {
|
||||
|
||||
@RequestMapping("/greeting")
|
||||
public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
|
||||
//increment the id every time the page is refreshed (a new user visits the page)
|
||||
return new Greeting(counter.incrementAndGet(),
|
||||
String.format(template, name));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user