Java 子目录中的Velocity模板

Java 子目录中的Velocity模板,java,spring,spring-mvc,velocity,subdirectory,Java,Spring,Spring Mvc,Velocity,Subdirectory,我有spring mvc项目配置,velocity配置如下: <bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> <property name="resourceLoaderPath" value="/WEB-INF/velocity/"/> </bean> <bean id="viewResolv

我有spring mvc项目配置,velocity配置如下:

<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
    <property name="resourceLoaderPath" value="/WEB-INF/velocity/"/>
</bean>

<bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver">
    <property name="cache" value="false" />
    <property name="viewClass" value="org.springframework.web.servlet.view.velocity.VelocityLayoutView"/>
    <property name="contentType" value="text/html;charset=UTF-8" />
    <property name="prefix" value=""/>
    <property name="suffix" value=".vm"/>
    <property name="exposeSpringMacroHelpers" value="true" />
    <property name="exposeRequestAttributes" value="true" /> 
</bean>
Strucrute od WEB-INF是:

/WEB-INF/velocity/ /WEB-INF/velocity/login.vm /WEB-INF/velocity/register.vm /WEB-INF/velocity/account/forget.vm

我可以使用以下工具打开登录页面和注册页面:

example.com/login.vm example.com/register.vm

但我无法访问 example.com/account/forget.vm

我错过了什么


谢谢。

您能把控制器也贴出来吗?谢谢!桑托什·乔希,就是这样。。。。我忘了放置控制器,我希望找到没有控制器映射的模板。