源码解读
文章平均质量分 96
源码解读
RogerKan
这个作者很懒,什么都没留下…
展开
-
spring注解解析、IOC装配机制及IOC注入bean的五种方式
使用注解定义bean:通过注解的形式,将bean以及相应的属性值放入IOC容器中 步骤: 1、在该类中使用注解 在类文件的开头写上以下中一个(具体哪一个自己看情况选择) (1)、@Component(“id”) :通用的 (2)、@Repository(“id”) :dao层注解 (3)、@Service(“id”) :service层注解 (4)、@Conroller(“id”) :控制器层注解 例如,在Student类前面加上@Component(“student”);并且导入相应的包 import o原创 2021-01-15 14:42:54 · 375 阅读 · 0 评论 -
idea搭建spring源码阅读环境
1.安装gradle 1.下载gradle https://gradle.org/releases/ 2.把下载好的zip包解压到安装路径 3.配置环境变量 把环境变量添加到path中 安装成功 2.下载项目 码云项目路径: https://gitee.com/mirrors/Spring-Framework/tree/5.1.x/ 下载并切换分支命令: git clone https://gitee.com/mirrors/Spring-Framework.git -b 5.1.x 3.导入项目转载 2020-12-22 18:55:20 · 914 阅读 · 1 评论