com.jarvis.cache.util.AopUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoload-cache-spring-boot-starter Show documentation
Show all versions of autoload-cache-spring-boot-starter Show documentation
autoload-cache spring boot starter.
The newest version!
package com.jarvis.cache.util;
import org.springframework.aop.framework.AopProxyUtils;
/**
*
*/
public class AopUtil {
/**
* @param target
* @return
*/
public static Class> getTargetClass(Object target) {
Class> targetClass = AopProxyUtils.ultimateTargetClass(target);
if (targetClass == null && target != null) {
targetClass = target.getClass();
}
return targetClass;
}
}