課程
/后端開發(fā)
/Java
/Spring入門篇
請問各位為什么會出現(xiàn)這個情況
2018-06-09
源自:Spring入門篇 4-1
正在回答
相信樓主已經(jīng)解決了,我也遇到相同問題也解決了,發(fā)出來給后人看。
xmlns:context="http://www.springframework.org/schema/context"
問題出在這一行,樓主圖片里的多出了個空格。
<?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:aop="http://www.springframework.org/schema/aop"?
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
? ? ? ? http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop?
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
? ? ? ? http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="theo.advisor"></context:component-scan>
</beans>
這個你直接復(fù)制粘貼用看看。不懂你為什么會那樣。
慕萊塢6472995 提問者
Linzhao 回復(fù) 慕萊塢6472995 提問者
這一句
xmlns:context="
http://www.springframework.org/schema/context/spring-context.xsd
你用這個試試
舉報
為您帶來IOC和AOP的基本概念及用法,為后續(xù)高級課程學(xué)習(xí)打下基礎(chǔ)
1 回答請問這個錯誤是為什么
4 回答還是報錯,請問有同學(xué)遇到這種情況嗎?
2 回答為什么我更改構(gòu)造器形參不會報錯?為什么老師的能報錯
4 回答為什么會錯呢
1 回答為什么在測試文件時會報錯java.lang.nullpointerexception
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)微信公眾號
2018-10-24
相信樓主已經(jīng)解決了,我也遇到相同問題也解決了,發(fā)出來給后人看。
xmlns:context="http://www.springframework.org/schema/context"
問題出在這一行,樓主圖片里的多出了個空格。
2018-06-09
<?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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"?
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
? ? ? ? http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop?
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx
? ? ? ? http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="theo.advisor"></context:component-scan>
</beans>
這個你直接復(fù)制粘貼用看看。不懂你為什么會那樣。
2018-06-09
2018-06-09
xmlns:context="
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
你用這個試試