2 回答

TA貢獻(xiàn)2021條經(jīng)驗(yàn) 獲得超8個(gè)贊
你spring配置文件的頭部 schema出問題了
1)http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd這個(gè)找不到
3)這個(gè)文件的根元素不是<xsd:schema>
你可以找個(gè)正確的把你這個(gè)xml配置文件的頭部替換一下,不知道你使用的spring哪個(gè)版本,下面我貼一個(gè):僅供參考,或者你可以在網(wǎng)上搜索一個(gè)正確的替換下:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
</beans>

TA貢獻(xiàn)1830條經(jīng)驗(yàn) 獲得超3個(gè)贊
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
</beans>
添加回答
舉報(bào)