This commit is contained in:
Looly 2023-04-24 09:54:58 +08:00
parent f8d6dda10e
commit e16c734756
13 changed files with 26 additions and 60 deletions

View File

@ -10,7 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.aspects;
package org.dromara.hutool.extra.aop;
import java.lang.reflect.Method;

View File

@ -10,11 +10,10 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.proxy;
package org.dromara.hutool.extra.aop;
import org.dromara.hutool.core.reflect.ConstructorUtil;
import org.dromara.hutool.core.spi.SpiUtil;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import java.io.Serializable;

View File

@ -13,8 +13,6 @@
package org.dromara.hutool.extra.aop;
import org.dromara.hutool.core.classloader.ClassLoaderUtil;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import org.dromara.hutool.extra.aop.proxy.ProxyFactory;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

View File

@ -10,9 +10,7 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.interceptor;
import org.dromara.hutool.extra.aop.aspects.Aspect;
package org.dromara.hutool.extra.aop;
import java.io.Serializable;

View File

@ -12,6 +12,8 @@
package org.dromara.hutool.extra.aop.aspects;
import org.dromara.hutool.extra.aop.Aspect;
import java.io.Serializable;
import java.lang.reflect.Method;

View File

@ -10,11 +10,12 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.interceptor;
package org.dromara.hutool.extra.aop.engine.jdk;
import org.dromara.hutool.core.reflect.ModifierUtil;
import org.dromara.hutool.core.reflect.ReflectUtil;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import org.dromara.hutool.extra.aop.Aspect;
import org.dromara.hutool.extra.aop.SimpleInterceptor;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;

View File

@ -10,11 +10,11 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.proxy;
package org.dromara.hutool.extra.aop.engine.jdk;
import org.dromara.hutool.extra.aop.ProxyFactory;
import org.dromara.hutool.extra.aop.ProxyUtil;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import org.dromara.hutool.extra.aop.interceptor.JdkInterceptor;
import org.dromara.hutool.extra.aop.Aspect;
/**
* JDK实现的切面代理

View File

@ -10,9 +10,10 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.interceptor;
package org.dromara.hutool.extra.aop.engine.spring;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import org.dromara.hutool.extra.aop.Aspect;
import org.dromara.hutool.extra.aop.SimpleInterceptor;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

View File

@ -10,10 +10,10 @@
* See the Mulan PSL v2 for more details.
*/
package org.dromara.hutool.extra.aop.proxy;
package org.dromara.hutool.extra.aop.engine.spring;
import org.dromara.hutool.extra.aop.aspects.Aspect;
import org.dromara.hutool.extra.aop.interceptor.SpringCglibInterceptor;
import org.dromara.hutool.extra.aop.ProxyFactory;
import org.dromara.hutool.extra.aop.Aspect;
import org.springframework.cglib.proxy.Enhancer;
/**
@ -22,7 +22,7 @@ import org.springframework.cglib.proxy.Enhancer;
* @author looly
*
*/
public class SpringCglibProxyFactory implements ProxyFactory{
public class SpringCglibProxyFactory implements ProxyFactory {
private static final long serialVersionUID = 1L;
@Override

View File

@ -1,19 +0,0 @@
/*
* Copyright (c) 2023 looly(loolly@aliyun.com)
* Hutool is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* 代理拦截器实现
*
* @author looly
*
*/
package org.dromara.hutool.extra.aop.interceptor;

View File

@ -11,7 +11,12 @@
*/
/**
* JDK动态代理封装提供非IOC下的切面支持
* JDK动态代理封装提供非IOC下的切面支持封装包括
* <ul>
* <li>基于{@link java.lang.reflect.Proxy}代理</li>
* <li>基于Spring-cglib代理</li>
* </ul>
* 考虑到cglib库不再更新且对JDK9+兼容性问题不再封装
*
* @author looly
*

View File

@ -1,19 +0,0 @@
/*
* Copyright (c) 2023 looly(loolly@aliyun.com)
* Hutool is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
/**
* 代理实现
*
* @author looly
*
*/
package org.dromara.hutool.extra.aop.proxy;

View File

@ -10,5 +10,5 @@
# See the Mulan PSL v2 for more details.
#
org.dromara.hutool.extra.aop.proxy.SpringCglibProxyFactory
org.dromara.hutool.extra.aop.proxy.JdkProxyFactory
org.dromara.hutool.extra.aop.engine.spring.SpringCglibProxyFactory
org.dromara.hutool.extra.aop.engine.jdk.JdkProxyFactory