- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
31 lines
897 B
Java
31 lines
897 B
Java
package com.starry.common.controller;
|
|
|
|
import com.starry.common.domain.Captcha;
|
|
import com.starry.common.redis.CaptchaService;
|
|
import com.starry.common.result.R;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import javax.annotation.Resource;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* @author admin 验证码前端控制器
|
|
* @since 2022/7/7
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/captcha")
|
|
public class CaptchaController {
|
|
|
|
@Resource
|
|
private CaptchaService captchaService;
|
|
|
|
@ApiOperation(value = "生成验证码拼图")
|
|
@PostMapping("get-captcha")
|
|
public R getCaptcha(@RequestBody Captcha captcha) {
|
|
return R.ok(captchaService.getCaptcha(captcha));
|
|
}
|
|
|
|
}
|