Freemarker TemplateLoader.findTemplateSource("WEB-INF/template/index.html"): Not found错误原因
来源:互联网 发布:openwrt 网络唤醒 编辑:程序博客网 时间:2024/06/06 08:29
Spring配置文件如下:
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> <property name="templateLoaderPath" value="/WEB-INF/tpl/" /> <property name="freemarkerSettings"> <props> <prop key="template_update_delay">0</prop> <prop key="default_encoding">UTF-8</prop> <prop key="number_format">0.##########</prop> <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop> <prop key="classic_compatible">true</prop> <prop key="template_exception_handler">rethrow</prop> <prop key="auto_import">/common/spring.ftl as spring</prop> </props> </property></bean>如果Spring的配置文件已经添加templateLoaderPath,SpringMVC中的Freemarker配置中的prefix不需要再进行配置或者留空就可以,否则就会报TemplateLoader.findTemplateSource("/WEB-INF/template/index.html"): Not found
<bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver"> <property name="cache" value="false" /> <property name="prefix" value="" /> <property name="suffix" value=".html" /> <property name="contentType" value="text/html;charset=UTF-8"></property> <property name="requestContextAttribute" value="request" /> <property name="exposeSpringMacroHelpers" value="true" /> <property name="exposeRequestAttributes" value="true" /> <property name="exposeSessionAttributes" value="true" /> </bean>
阅读全文
0 0
- Freemarker TemplateLoader.findTemplateSource("WEB-INF/template/index.html"): Not found错误原因
- /WEB-INF/tags" not found
- org.apache.jasper.JasperException: /WEB-INF/jsps/index.jsp(9,26) #{...} is not allowed in template t
- WEB-INF/servlet/view not found
- command not found错误原因
- Template template/*/form-close.ftl not found. - Class: freemarker.template.Configuration
- FreeMarker使用Template生成可变参数的json(一),及访问Template出现not found
- delphi system.pas not found 错误原因
- ”device not found“错误原因及解决方法
- The Web application at could not be found. 特殊情况的错误原因
- springmvc报404Not Found /WEB-INF/jsp/success.jsp was not found on this server.
- Template /template/ajax/head.ftl not found.
- Template /template/pimple/a.ftl not found
- Feature 'taglib' not found. (platform:/resource/bbs/WebContent/WEB-INF/web.xml)
- web.py使用模板时报错No template named index原因及解决方案
- 错误日志struts2 http 404 not found可能原因之一
- 导致jquery.min.map 404 (Not Found)错误的原因
- Hibernate(Oracle) 报Source not found错误原因一
- 最新版Oracle数据库的PLSQL安装链接服务器
- Error:Execution failed for task transformClassesWithDexForDebug
- TypeScript 学习笔记:属性索引器
- ios10 禁止用户缩放失效
- How to output the message when using the function 'printf'
- Freemarker TemplateLoader.findTemplateSource("WEB-INF/template/index.html"): Not found错误原因
- form表单提交方式
- 面试可能问到的问题
- 大数据的应用:给顾客打上几百个标签
- Java SimpleDateFormat进行日期格式化
- 为何要向首屈一指的RagingWire数据中心公司看齐
- mysql数据库sql语句通过DATE_FORMAT格式化日期
- JAVA课程3 1+2+3+n<8888的最大正整数 N
- 去广告神器的实现