2021
10-12
10-12
Springboot配置suffix指定mvc视图的后缀方法
Springboot配置suffix指定mvc视图后缀如下所示:spring:#配置MVC视图后缀mvc:view:suffix:".html"配置指定后缀之后访问welcome.html页面时只需要写“welcome”即可。@ControllerpublicclassdemoController{@GetMapping("/a")publicStringdemo(){return"welcome";}运行结果:SpringBoot配置MVC-controller请求的后缀名1.启动类添加配置packagecom.ias.oil.client.schedule;importcom.ias...
继续阅读 >