There is no Spring Config XML file when IDEA creates a Spring project

If you need to solve the problem that the Spring Config XML file does not have as shown in the figure below, please continue to read

In the first step, pom.xml adds dependencies:

       <!--导入Spring坐标-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>5.2.10.RELEASE</version>
        </dependency>

Step 2: Refresh maven and recreate

Step 3: If the first two steps are not available, see if there is a spring plugin

Step 4: If you still haven't created it manually

<?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
        https://www.springframework.org/schema/beans/spring-beans.xsd">
   
</beans>

Guess you like

Origin blog.csdn.net/m0_68055637/article/details/129232839