mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-13 21:43:45 +08:00
25 lines
637 B
Java
25 lines
637 B
Java
package demo.springboot.web;
|
||
|
||
import demo.springboot.config.BookProperties;
|
||
import org.springframework.beans.factory.annotation.Autowired;
|
||
import org.springframework.web.bind.annotation.GetMapping;
|
||
import org.springframework.web.bind.annotation.RestController;
|
||
|
||
/**
|
||
* Spring Boot Hello案例
|
||
*
|
||
* Created by bysocket on 26/09/2017.
|
||
*/
|
||
@RestController
|
||
public class HelloBookController {
|
||
|
||
@Autowired
|
||
BookProperties bookProperties;
|
||
|
||
@GetMapping("/book/hello")
|
||
public String sayHello() {
|
||
return "Hello, " + bookProperties.getWriter() + " is writing "
|
||
+ bookProperties.getName() + " !";
|
||
}
|
||
}
|