pom.xml文件 报错 怎么回事儿?

来源:3-5 Hello Spring MVC

慕的地5420249

2019-03-01 19:54

pom.xml文件 报错 怎么回事儿?

写回答 关注

2回答

  • weixin_慕田峪9562989
    2019-03-02 16:45:40

    <?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.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                   

        http://www.springframework.org/schema/util 

      http://www.springframework.org/schema/util/spring-util.xsd">  

     <!-- 激活标注 -->

     <context:annotation-config />

       <!-- 对module包中的所有类进行扫描,以完成Bean创建和自动依赖注入的功能-->  

       <context:component-scan base-package="com.imooc.mvcdemo.controller">

     <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"></context:include-filter>

     </context:component-scan>  

     <mvc:annotation-driven></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>


    qq_慕先生...

    太感谢你了,终于配置好了,可是老师的错在哪里啊

    2019-10-22 20:31:42

    共 1 条回复 >

  • jisu_che
    2019-03-02 14:36:05

    可以发下报什么错吗

Spring MVC起步

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

195979 学习 · 572 问题

查看课程

相似问题