How to map requests to HTML file in Spring MVC?

前端 未结 7 1174
你的背包
你的背包 2020-11-29 20:44

Basic configuration files looks unintuitive.

If I create simple hello world example, and then rename home.jsp to home.html and edit

7条回答
  •  囚心锁ツ
    2020-11-29 21:20

    I think the InternalResourceViewResolver supports servlets and jsp files. Suffix as per Spring's API javadocs is that which "gets appended to view names when building a URL". It is not the file's extension, even though it is very misleading. I checked on UrlBasedViewResolver setSuffix() class.

    Probably if they name it as viewSuffix, it might make more sense, I guess.

提交回复
热议问题