-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc57ac3
commit 9588ace
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...-system-biz/src/main/java/org/jeecg/modules/system/controller/WechatVerifyController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
} | ||
} | ||
|