问题描述
我使用IntelliJ Idea 12 IDE创建了一个简单的spring mvc应用程序,我想找到一种方法来更改应用程序用于存储jsp页面(WEB-INF / pages)到WEB-INF /的默认文件夹观点。
我甚至试图删除页面目录,但在部署应用程序后,它再次尝试在WEB-INF / pages中找到我的jsp文件。
有什么想法吗?
谢谢。
I have created a simple spring mvc application using IntelliJ Idea 12 IDE, and I want to find a way to change the default folder that the applications is using for storing jsp pages (WEB-INF/pages) to WEB-INF/views.I even tried to delete the pages directory but after deploying the application it tries again to find my jsp file inside the WEB-INF/pages.Any ideas?Thank you.
推荐答案
这太简单了...但是当你累了,你可以问简单的问题。
我刚刚在默认的servlet配置文件中更改了此设置:
That was too easy...but it seems that when you are tired you can ask easy questions.I just changed this setting in my default servlet config file :
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jspx"/>
</bean>
这篇关于如何更改我的Spring Mvc应用程序使用的默认jsp目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!