Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不支持 /encryptEntity/{parm} #69

Open
liufeikl2008 opened this issue Jan 11, 2021 · 8 comments
Open

不支持 /encryptEntity/{parm} #69

liufeikl2008 opened this issue Jan 11, 2021 · 8 comments

Comments

@liufeikl2008
Copy link

不支持 /encryptEntity/{parm} 这种方式的加解密啊

@yinjihuan
Copy link
Owner

@human-user
Copy link

有的 https://mp.weixin.qq.com/s/TbTr44Hc9gkJB40L9eHHYQ

似乎这里指的是加密filter的匹配模式不支持/encryptEntity/{parm}这种路径变量,例如post:/encryptEntity/abc,contains()方法无法匹配到list中对应的post:/encryptEntity/{parm},会返回false

    private boolean contains(List<String> list, String uri, String methodType) {
        if (list.contains(uri)) {
            return true;
        }
        String prefixUri = methodType.toLowerCase() + ":" + uri;
        logger.debug("contains uri: {}", prefixUri);
        if (list.contains(prefixUri)) {
            return true;
        }
        return false;
    }

@gewei123456
Copy link

请问一下@Encrypt用在get请求/aaims/apply/api/v1/applyDetial/{dataId}也就是类似于这种类型的方法上,return的数据,在swagger上测试返回的为什么还是明文,POST请求用了@Encrypt@decrypt都没问题,swagger测试,入参出参都正常是密文,配置用的是引入POM依赖,启动类上加的@EnableEncrypt自动注解,yml文件里就配置了key和debug参数,项目是属于springboot类型的

@yinjihuan
Copy link
Owner

@human-user 目前是不支持的,后面我想下看怎么能支持

@yinjihuan
Copy link
Owner

@gewei123456 debug=true吗?开启debug模式就不会进行加解密

@gewei123456
Copy link

gewei123456 commented Mar 23, 2021 via email

@human-user
Copy link

@yinjihuan
使用Spring Boot自带的AntPathMatcher能很好处理

yinjihuan pushed a commit that referenced this issue Mar 30, 2021
yinjihuan pushed a commit that referenced this issue Mar 30, 2021
yinjihuan pushed a commit that referenced this issue Mar 30, 2021
@yinjihuan
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants