第一章、Spring入门(体系架构以及配置文件说明)

Spring的体系架构

Spring至今已经集成了20多个模块,这些模块分布在核心容器、数据访问/继承层、Web层、AOP模块、植入模块(Instrumentation)、消息传输(Messaging)和测试模块中

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

配置文件

Spring的配置文件的名称可以是自定义的,但是习惯上命名为applicationContext.xml,有的时候也命名为beans.xml。另外配置文件信息不需要读者手写,可以在Spring的帮助文档中去复制(首先使用浏览器打开)"\spring-framework-5.0.2.RELEASE\docs\spring-framework-reference\index.html,”在页面中单击超链接Core,在 1.2.1 Configuration metadata 小节下即可找到配 置文 件的约束 信息)。

注意:这是你下载的spring包中的路径,而不是url

\spring-framework-5.0.2.RELEASE\docs\spring-framework-reference\index.html

3.2.0在下面查找

/spring/spring-framework-3.2.0.RELEASE/docs/spring-framework-reference/html/beans.html
约束类似于

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

  <bean id="..." class="...">
    <!-- collaborators and configuration for this bean go here -->
  </bean>

  <bean id="..." class="...">
    <!-- collaborators and configuration for this bean go here -->
  </bean>

  <!-- more bean definitions go here -->

</beans>
发布了105 篇原创文章 · 获赞 18 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_38367817/article/details/105607788
今日推荐