Package | Description |
---|---|
org.dromara.hutool.extra.aop |
JDK动态代理封装,提供非IOC下的切面支持,封装包括:
基于
Proxy 代理
基于Spring-cglib代理
考虑到cglib库不再更新且对JDK9+兼容性问题,不再封装
createEngine proxy
ProxyEngineFactory =》 ProxyEngine =》 Proxy
|
org.dromara.hutool.extra.aop.aspects |
切面实现,提供一些基本的切面实现
|
org.dromara.hutool.extra.aop.engine |
切面实现引擎
|
org.dromara.hutool.extra.aop.engine.jdk |
JDK方式切面实现,基于
Proxy 封装 |
org.dromara.hutool.extra.aop.engine.spring |
Spring-cglib切面实现
|
Modifier and Type | Field and Description |
---|---|
protected Aspect |
SimpleInterceptor.aspect |
Modifier and Type | Method and Description |
---|---|
static <T> T |
ProxyUtil.proxy(T target,
Aspect aspect)
使用切面代理对象
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
ProxyUtil.proxy(T target,
Class<? extends Aspect> aspectClass)
使用切面代理对象
|
Constructor and Description |
---|
SimpleInterceptor(Object target,
Aspect aspect)
构造
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleAspect
简单切面类,不做任何操作
可以继承此类实现自己需要的方法即可 |
class |
TimeIntervalAspect
通过日志打印方法的执行时间的切面
|
Modifier and Type | Method and Description |
---|---|
<T> T |
ProxyEngine.proxy(T target,
Aspect aspect)
创建代理
|
Modifier and Type | Method and Description |
---|---|
default <T> T |
ProxyEngine.proxy(T target,
Class<? extends Aspect> aspectClass)
创建代理
|
Modifier and Type | Method and Description |
---|---|
<T> T |
JdkProxyEngine.proxy(T target,
Aspect aspect) |
Constructor and Description |
---|
JdkInterceptor(Object target,
Aspect aspect)
构造
|
Modifier and Type | Method and Description |
---|---|
<T> T |
SpringCglibProxyEngine.proxy(T target,
Aspect aspect) |
Constructor and Description |
---|
SpringCglibInterceptor(Object target,
Aspect aspect)
构造
|
Copyright © 2025. All rights reserved.