为了账号安全,请及时绑定邮箱和手机立即绑定

默默地把配置文件敲了出来···

我默默的把它敲了出来···

<?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"  
    xmlns:util="http://www.springframework.org/schema/util"  
    xsi:schemaLocation="
 http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd              
    http://www.springframework.org/schema/context 
  http://www.springframework.org/schema/context/spring-context-3.0.xsd     
    http://www.springframework.org/schema/mvc 
  http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd                   
    http://www.springframework.org/schema/util 
  http://www.springframework.org/schema/util/spring-util-3.0.xsd">  
 <!-- 激活标注 -->
 <context:annotation-config />
   <!-- 对module包中的所有类进行扫描,以完成Bean创建和自动依赖注入的功能-->  
   <context:component-scan base-package="com.maven.mvcdemo">  
 <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller">
   </context:component-scan>
 <mvc:annotation-driven /><!-- 启用基于annotation的handlerMapping -->
    <!-- 定义视图解析器,在视图模型前后添加前缀后缀-->  
   <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/jsps/" />
        <property name="suffix" value=".jsp" />
   </bean>
</beans>


正在回答

2 回答

哈哈  好辛苦 

0 回复 有任何疑惑可以回复我~

mvc-dispatcher-servlet.xml

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Spring MVC起步
  • 参与学习       195980    人
  • 解答问题       572    个

Java中Spring MVC框架入门教程,快来看最易用的MVC框架

进入课程

默默地把配置文件敲了出来···

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信