課程
/后端開發(fā)
/Java
/Spring MVC起步
pom.xml文件 報錯 怎么回事兒?
2019-03-01
源自:Spring MVC起步 3-5
正在回答
<?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">??
?<!-- 激活標(biāo)注 -->
?<context:annotation-config />
? ?<!-- 對module包中的所有類進行掃描,以完成Bean創(chuàng)建和自動依賴注入的功能-->??
? ?<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_慕先生1069585
你是直接下載的源碼嗎?源碼是錯的
可以發(fā)下報什么錯嗎
舉報
Java中Spring MVC框架入門教程,快來看最易用的MVC框架
2 回答pom.xml報錯
2 回答mvc-dispatcher-servlet.xml報錯,怎么回事呀?
1 回答pom.xml配置文件
2 回答pom.xml 文件中的<type>pom</type>報錯,請教。
2 回答pom.xml第一行報錯
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2019-03-02
<?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">??
?<!-- 激活標(biāo)注 -->
?<context:annotation-config />
? ?<!-- 對module包中的所有類進行掃描,以完成Bean創(chuàng)建和自動依賴注入的功能-->??
? ?<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>
2019-03-02
你是直接下載的源碼嗎?源碼是錯的
2019-03-02
可以發(fā)下報什么錯嗎