![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
文章平均质量分 81
小白不会java
在校学生,java小白
展开
-
SpringBoot项目中使用AOP的方法
1.概述将通用的逻辑用AOP技术实现可以极大的简化程序的编写,例如验签、鉴权等。Spring的声明式事务也是通过AOP技术实现的。Spring的AOP技术主要有4个核心概念:Pointcut: 切点,用于定义哪个方法会被拦截,例如 execution(* cn.springcamp.springaop.service.*.*(..))Advice: 拦截到方法后要执行的动作Aspect: 切面,把Pointcut和Advice组合在一起形成一个切面Join Point: 在执行时P.原创 2021-09-30 23:42:57 · 884 阅读 · 0 评论 -
Spring的IOC以及Bean管理
下面主要讲一下Bean管理即赋值的三种方法(设值注入,构造注入和自动装配)项目结构如下图实体类Studentpackage com.gxy.entity;/** * Created by 86157 on 2021/4/19. *//** * @author 86157 * @version 1.0 * @description: TODO * @date 2021/4/19 15:45 */public class Student { private int原创 2021-04-21 16:10:08 · 2355 阅读 · 0 评论