package com.lqkj.cmlcp.module.test.controller; import com.lqkj.cmlcp.message.Result; import com.lqkj.cmlcp.module.test.service.CaptchaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/test") public class TestController { @Autowired private CaptchaService captchaService; @GetMapping("/test1") public Result test1() { var captcha = captchaService.findAll(); return Result.ok(captcha); } @PostMapping("/test2") public Result test2() { var captcha = captchaService.findById(); return Result.ok(captcha); } }