JaseG256 6 年之前
父節點
當前提交
ae1f9215d0

二進制
.DS_Store 查看文件


+ 1
- 1
complete/src/main/java/hello/Application.java 查看文件

@@ -9,4 +9,4 @@ public class Application {
9 9
     public static void main(String[] args) {
10 10
         SpringApplication.run(Application.class, args);
11 11
     }
12
-}
12
+}

+ 2
- 6
complete/src/main/java/hello/Greeting.java 查看文件

@@ -10,11 +10,7 @@ public class Greeting {
10 10
         this.content = content;
11 11
     }
12 12
 
13
-    public long getId() {
14
-        return id;
15
-    }
13
+    public long getId() { return id; }
16 14
 
17
-    public String getContent() {
18
-        return content;
19
-    }
15
+    public String getContent() { return content; }
20 16
 }

+ 3
- 4
complete/src/main/java/hello/GreetingController.java 查看文件

@@ -12,8 +12,7 @@ public class GreetingController {
12 12
     private final AtomicLong counter = new AtomicLong();
13 13
 
14 14
     @RequestMapping("/greeting")
15
-    public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
16
-        return new Greeting(counter.incrementAndGet(),
17
-                            String.format(template, name));
15
+    public Greeting greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
16
+        return new Greeting(counter.incrementAndGet(), String.format(template, name));
18 17
     }
19
-}
18
+}