mirror of https://github.com/jeecgboot/jeecg-boot
企业微信域名文件认证万能接口
parent
cc57ac379b
commit
9588ace87f
|
@ -119,6 +119,8 @@ public class ShiroConfig {
|
||||||
filterChainDefinitionMap.put("/swagger**/**", "anon");
|
filterChainDefinitionMap.put("/swagger**/**", "anon");
|
||||||
filterChainDefinitionMap.put("/webjars/**", "anon");
|
filterChainDefinitionMap.put("/webjars/**", "anon");
|
||||||
filterChainDefinitionMap.put("/v2/**", "anon");
|
filterChainDefinitionMap.put("/v2/**", "anon");
|
||||||
|
// 企业微信证书排除
|
||||||
|
filterChainDefinitionMap.put("/WW_verify*", "anon");
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
|
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 企业微信证书验证
|
||||||
|
* @author: wangshuai
|
||||||
|
* @date: 2023/12/6 10:42
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
public class WechatVerifyController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业微信验证
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/WW_verify_{code}.txt")
|
||||||
|
public void mpVerify(@PathVariable("code") String code, HttpServletResponse response) {
|
||||||
|
try {
|
||||||
|
PrintWriter writer = response.getWriter();
|
||||||
|
writer.write(code);
|
||||||
|
writer.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("企业微信证书验证失败!");
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue