<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
https://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
https://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.hzh.controller"/>
<mvc:default-servlet-handler/>
<mvc:annotation-driven/>
<!-- 视图解析器-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResolver">
<!-- 前缀-->
<property name="prefix" value="/WEB-INF/jsp/"/>
<!-- 后缀-->
<property name="suffix" value=".jsp"/>
</bean>
</beans>
在springmvc注解方法中,springmvc-servlet.xml的配置
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:vue页面传参和接参
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
springmvc 的原理以及工作流程(面试)
springMVC 工作流程及原理
MVC 工作流程 原理 -
QGIS在Linux中配置的方法
本文介绍在Linux操作系统Ubuntu版本中,通过命令行的方式,配置QGIS软件的方法~
QGIS Linux Ubuntu 软件 安装 -
springmvc-servlet.xml
代码】springmvc-servlet.xml。
servlet xml java spring mvc -
springmvc项目,web.xml文件模板,配置springmvc的servlet
开发的时候,编写配置文件是一件很麻烦的事,直接复制多好,还不会出错
servlet 前端 xml spring mvc -
SpringMVC配置多个servlet.xml文件
[code="xml"] dmt org.springframework.web.servlet.DispatcherSe
java web.xml 测试 spring 后缀名 -
Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]【解决方案】
第一次自学springmvc的时候,老是报错Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml],郁闷的不要不要的。按照配置规则重新检查了一遍,没看出问题来,上网搜了一下说在web.xml里面加入: springmvc org.springframework.web.servlet.Dispa
java springboot spring spring mvc -
能源项目xml文件 -- springMVC-servlet.xml
application/json;charset=UTF-8 text/html; charset=utf...
spring mvc xml html json -
springmvc-servlet.xml 第二种选择
text/plain;charset=UTF-8
spring mvc xml json 后缀 -
springmvc在web.xml中的配置
ok,ok,ok,it is the springmvc of xml file...
springMvc spring xml mvc 后缀