簡體   English   中英

Spring Boot .html文件無法解析

[英]Spring Boot .html files not resolving

我有一個Spring Boot應用程序-

我有一個控制器-

@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才能映射到上述GET。

我怎么做?

使用映射/添加另一個默認方法,並返回錯誤或其他任何信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM