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>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM