Spring Boot 入门、Spring Boot 配置、Web 开发、模板引擎、数据存储、数据缓存 案例更新

This commit is contained in:
liqiangqiang
2018-04-08 14:46:30 +08:00
parent c862ecd73b
commit fc5200546c
70 changed files with 2201 additions and 293 deletions

View File

@@ -0,0 +1,24 @@
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() + " ";
}
}