|
|
@ -1,7 +1,6 @@
|
|
|
|
package org.dromara.common.core.utils;
|
|
|
|
package org.dromara.common.core.utils;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
|
import org.springframework.aop.framework.AopContext;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
|
|
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
|
|
|
import org.springframework.boot.autoconfigure.thread.Threading;
|
|
|
|
import org.springframework.boot.autoconfigure.thread.Threading;
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
@ -50,10 +49,9 @@ public final class SpringUtils extends SpringUtil {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
public static <T> T getAopProxy(T invoker) {
|
|
|
|
public static <T> T getAopProxy(T invoker) {
|
|
|
|
return (T) AopContext.currentProxy();
|
|
|
|
return (T) getBean(invoker.getClass());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取spring上下文
|
|
|
|
* 获取spring上下文
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|