Spring Boot WebFlux 整合 Thymeleaf

This commit is contained in:
liqiangqiang
2018-04-20 09:22:08 +08:00
parent 86aedc590e
commit 7f681370fa
2 changed files with 22 additions and 0 deletions

View File

@@ -46,6 +46,15 @@ public class CityWebFluxController {
return cityHandler.deleteCity(id);
}
@GetMapping("/hello")
public Mono<String> hello(final Model model) {
model.addAttribute("name", "泥瓦匠");
model.addAttribute("city", "浙江温岭");
String path = "hello";
return Mono.create(monoSink -> monoSink.success(path));
}
private static final String CITY_LIST_PATH_NAME = "cityList";
@GetMapping("/page/list")