org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:

プロジェクトのシナリオ:

Spring 環境を構成するときに、stdout は次の例外情報を報告します。

例外情報


問題の説明:

重要な情報は次のとおりです: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException


原因分析:

解析例外はspring.xml設定ファイルのbeansタグ内にあり、Springフレームワークに必要な属性値が追加されていないため、対応するリソース格納パスが見つからないことが判明し、エラーとなった。


解決:

以下に提供されている形式に従って再構成するだけです。

<?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:annotation-config/>
 
</beans>

お役にたてましたら、忘れずに3回クリックしてください~

おすすめ

転載: blog.csdn.net/weixin_48627356/article/details/121732422