Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Spring MVC 项目。对于每个请求,它都会返回 jsp 页面。但是对于特定的 URL,它应该返回 html 页面吗?我该怎么办?提前致谢
<mvc:resources>可能是您正在寻找的东西。
<mvc:resources>
http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-config-static-resources
希望这可以帮助。
我总是将 mvc:resources 标签用于需要处理或安全的静态资源。