Skip to content

Commit

Permalink
fix(imageCode): 生成验证码randomStr参数未指定参名字异常
Browse files Browse the repository at this point in the history
  • Loading branch information
carl committed Nov 14, 2024
1 parent e6b922e commit 78aa228
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;
Expand All @@ -36,7 +37,7 @@ public class ImageCodeEndpoint {
*/
@SneakyThrows
@GetMapping("/image")
public void image(String randomStr, HttpServletResponse response) {
public void image(@RequestParam("randomStr") String randomStr, HttpServletResponse response) {
ArithmeticCaptcha captcha = new ArithmeticCaptcha(DEFAULT_IMAGE_WIDTH, DEFAULT_IMAGE_HEIGHT);

if (Validator.isMobile(randomStr)) {
Expand Down

0 comments on commit 78aa228

Please sign in to comment.