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

Project scenario:

When configuring the spring environment, stdout reports the following exception information

exception information


Problem Description:

The key information is this one: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException


Cause Analysis:

The analysis abnormality was located in the beans tag of the spring.xml configuration file, and it was found that the corresponding resource storage path could not be found because the attribute value required by the Spring framework was not added, resulting in an error.


solution:

Just reconfigure according to the format provided below.

<?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>

If it is useful to you, remember to click three times~

Guess you like

Origin blog.csdn.net/weixin_48627356/article/details/121732422