私は Spring 3 (3.1.2) と Google App Engine から始めています。
私はチュートリアルをオンラインでフォローしてきましたが、現在、起動中に問題があるBean関連のxmlを持っています。
これがコードです
<?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"
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">
<context:component-scan base-package="my.example">
すべての Java ファイルのルート パッケージは「my.example」です。サブパッケージは、サブパッケージを含む「モデル」と「コントローラー」です。今。
アプリを起動すると、次のエラーが返されます。
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from ServletContext resource [/WEB-INF/spring-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
より多くのスタックトレースがあります。
誰も私がこれを解決する方法を知っていますか? XSDをチェックしたところ、正しいようです。