springmvc 配置
来源:互联网 发布:氟硝西泮片淘宝店 编辑:程序博客网 时间:2024/05/01 05:43
1、web.xml的配置
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
2、springmvc-servlet.xml配置
<?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:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.self.controller"/>
<mvc:annotation-driven/>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>
</beans>
3、controller注解
- 【SpringMVC】SpringMVC配置FastJson
- SpringMVC 配置
- SpringMVC配置
- SpringMVC 配置
- SpringMVC配置
- SpringMVC配置
- SpringMVC 配置
- springMVC 配置
- springmvc 配置
- springmvc 配置
- SpringMVC配置
- SpringMVC配置
- springMVC配置
- SpringMvc配置
- springmvc 配置
- springmvc配置
- springmvc配置
- springmvc配置
- docker资源汇总
- Python Dict -> Object
- 微信第三方网站登录
- MySQL 5.6在Windows下免安装版配置
- jdbc基础 (三) 大文本、二进制数据处理
- springmvc 配置
- hdu4059---The Boss on Mars(容斥原理+前n项的4次方和)
- JAVA操作properties文件
- 使用Gradle打Android渠道包
- Stanford机器学习---第一讲. Linear Regression with one variable
- Hello Java!
- 遇见C++ Lambda
- 用angularjs 模块时Error: [ng:areq] Argument 'controller' is not a function,
- 用友ERT T6 技术解析(二) --WCF发布