add
This commit is contained in:
parent
c040298321
commit
d6f24d4c34
|
|
@ -1,5 +1,6 @@
|
|||
package com.ahbonus.demo4bonus;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
|
@ -10,7 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
public class GreetingController {
|
||||
|
||||
private static final String TEMPLATE = "Hello my dear, %s!";
|
||||
@GetMapping("/greeting")
|
||||
@PostMapping("/greeting")
|
||||
|
||||
public String greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
|
||||
return String.format(TEMPLATE, name);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ server:
|
|||
tomcat:
|
||||
accesslog:
|
||||
enabled: true
|
||||
#reference: https://blog.csdn.net/xxj_jing/article/details/134885361
|
||||
pattern: '%{yyyy-MM-dd HH:mm:ss}t %a %A %m %s %D %b %I %U%q %{User-Agent}i'
|
||||
# directory: /Users/chenyuzhen/tomcatlog/demo4bonus/
|
||||
directory: /opt/webapps/logs/demo4bonus/
|
||||
|
|
|
|||
Loading…
Reference in New Issue