Compare commits
No commits in common. "f110dd80190e944d99f1fd68c6540d49466ec025" and "d6f24d4c34e2ad6892cf8681e4aa390464bc34b8" have entirely different histories.
f110dd8019
...
d6f24d4c34
|
|
@ -1,6 +1,4 @@
|
|||
package com.ahbonus.demo4bonus;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
|
@ -11,19 +9,17 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
*/
|
||||
@RestController
|
||||
public class GreetingController {
|
||||
Logger logger= LoggerFactory.getLogger(GreetingController.class);
|
||||
|
||||
private static final String TEMPLATE = "Hello my dear, %s!";
|
||||
@PostMapping("/greeting")
|
||||
|
||||
public String greeting(@RequestParam(value = "name", defaultValue = "World") String name) {
|
||||
logger.info("Welcome from Anhui Bonus!");
|
||||
return String.format(TEMPLATE, name);
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/health")
|
||||
public String healthcheck() {
|
||||
logger.info("Server status is OK");
|
||||
return "OKOKOK";
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue