5、springmvc 的配置文件springmvc-servlet.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://.springframework.org/schema/beans" xmlns:xsi="http://.w3.org/2001/XMLSchema-instance" xmlns:aop="http://.springframework.org/schema/aop" xmlns:context="http://.springframework.org/schema/context" xmlns:mvc="http://.springframework.org/schema/mvc" xmlns:util="http://.springframework.org/schema/util" xmlns:tx="http://.springframework.org/schema/tx" xmlns:jdbc="http://.springframework.org/schema/jdbc" xmlns:cache="http://.springframework.org/schema/cache" xsi:schemaLocation=" http://.springframework.org/schema/beans http://.springframework.org/schema/beans/spring-beans-3.1.xsd http://.springframework.org/schema/aop http://.springframework.org/schema/aop/spring-aop-3.1.xsd http://.springframework.org/schema/context http://.springframework.org/schema/context/spring-context-3.1.xsd http://.springframework.org/schema/mvc http://.springframework.org/schema/mvc/spring-mvc-3.1.xsd http://.springframework.org/schema/util http://.springframework.org/schema/util/spring-util-3.1.xsd http://.springframework.org/schema/tx http://.springframework.org/schema/tx/spring-tx-3.1.xsd http://.springframework.org/schema/jdbc http://.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd http://.springframework.org/schema/cache http://.springframework.org/schema/cache/spring-cache-3.1.xsd"> <!-- 注解驱动 --> <mvc:annotation-driven /> <!-- 扫描 --> <context:component-scan base-package="com.test.dubboser3.controller"></context:component-scan> <!-- 视图解析器 --> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/view/"> </property> <property name="suffix" value=".jsp"></property> </bean> </beans>我们发现这里一点都没变化,全都是一样哈哈哈哈
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-44295-4.html
后来震撼到我了