<dependency>html <groupId>org.springframework.boot</groupId>web <artifactId>spring-boot-devtools</artifactId>spring <scope>runtime</scope>app <optional>true</optional>spring-boot </dependency>測試 |
修改後的只須要從新Build->Build Project便可,或者快捷鍵Ctrl+F9ui
package com.hosystem.deploy.controller;spa
import org.springframework.web.bind.annotation.GetMapping;3d import org.springframework.web.bind.annotation.RestController;htm
@RestController public class HelloController {
@GetMapping("/abc") public String hello(){ return "hello"; } } |
templates/hello.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>hello</h1>
</body> </html> |