update 优化 使用 spring 事件机制 重构 OssConfig 缓存更新

This commit is contained in:
疯狂的狮子li
2022-12-07 19:17:26 +08:00
parent 8cf3ead26c
commit fd83d6bc0a
2 changed files with 29 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ package com.ruoyi.common.core.utils;
import cn.hutool.extra.spring.SpringUtil;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContext;
/**
* spring工具类
@@ -59,4 +60,12 @@ public final class SpringUtils extends SpringUtil {
public static <T> T getAopProxy(T invoker) {
return (T) AopContext.currentProxy();
}
/**
* 获取spring上下文
*/
public static ApplicationContext context() {
return getApplicationContext();
}
}