2016-10-23 27 views
0

JPAをspringframeworkと統合しようとしていますが、エラーが発生しています。 この問題の解決に役立つ人もいます。私は本当に修正するべきではありません。 URIは、名前空間の宣言で使用されることcvc-complex-type.2.4.c:一致するワイルドカードは厳密ですが、要素 'context:component-scan'の宣言が見つかりません

<?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:tx="http://www.springframework.org/schema/tx" 
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd 
    http://www.springframework.org/schema/tx/ http://www.springframework.org/schema/tx/spring-tx-4.0.xsd 
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd 
    http://www.springframework.org/schema/context/ http://www.springframework.org/schema/context/spring-context-4.0.xsd" > 

    <!-- It register the beans in context and scan the annotations inside beans and activate them --> 
    <context:component-scan base-package="com.mycircle.dao"></context:component-scan> 

    <!-- This allow for dispatching requests to Controllers --> 
    <mvc:annotation-driven /> 

答えて

0

注URIが(末尾にスラッシュ)のschemaLocationに使用異なります

xmlns:context="http://www.springframework.org/schema/context" 

xsi:schemaLocation="http://www.springframework.org/schema/context/ http://www.springframework.org/schema/context/spring-context-4.0.xsd" 

両方のURIが同じでなければなりません。

希望します。

関連する問題