Spring Boot .HTML文件无法解决



我有一个弹簧靴应用 -

我有一个控制器 -

@Controller("CWOController")
@RequestMapping(value = "/cworequest")
public class CWOController {

    @RequestMapping(value = {"/index.html"}, method = {RequestMethod.GET})
    public String getCwoIdSearchForm(Model model) {
        model.addAttribute("cwoRequestForm", new CWORequest());
        return "index";
    }

这可以在URL-> http://localhost:8080/cworequest/

上使用。

但我需要 -> http://localhost:8080/cworequest/index.html以映射到上述。

我该怎么做?

添加使用映射/和返回错误或其他任何内容的另一个默认方法。

最新更新