first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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 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;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @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));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user