Spring基础01——在IDEA中编写spring.xml

如果需要在IDEA自动创建spring.xml配置文件,那么我们就需要先引入Spring相关的依赖

1 <dependency>
2      <groupId>org.springframework</groupId>
3      <artifactId>spring-context</artifactId>
4      <version>5.1.1.RELEASE</version>
5 </dependency>

 

引入之后我们就可以看到效果

 

自动生成的spring 配置文件:

1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
5 
6 </beans>

 

posted @ 2019-05-06 12:02  风云独舞  阅读(1367)  评论(0编辑  收藏  举报