22 lines
546 B
Java
Raw Normal View History

2016-07-26 09:43:09 -05:00
package com.baeldung;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
2016-07-26 09:43:09 -05:00
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
2016-07-26 09:43:09 -05:00
@RestController
public class BaeldungController {
2016-08-02 12:34:08 +03:00
@GetMapping("/hello")
2016-08-02 12:34:08 +03:00
public String sayHello(HttpServletResponse response) {
2016-07-26 09:43:09 -05:00
return "hello";
}
2016-08-02 12:34:08 +03:00
@PostMapping("/baeldung")
2016-08-02 12:34:08 +03:00
public String sayHelloPost(HttpServletResponse response) {
2016-07-26 09:43:09 -05:00
return "hello";
}
}