方法1:

重新创建文件夹,配置yml文件:

spring.resources.static-locations=classpath:/view/
spring.mvc.view.suffix=.html

 

方法2:

controller里return后面加上html

@Controller
public class HelloController {

    @GetMapping("/aaa")
    public String hello(){
        return "success.html";
    }

}

 

相关文章:

  • 2021-11-20
  • 2021-11-20
  • 2023-01-28
  • 2022-12-23
  • 2021-09-19
  • 2021-11-06
  • 2021-05-06
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2021-11-20
  • 2021-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-01-06
相关资源
相似解决方案