|
|
@@ -7,10 +7,10 @@ import cn.iselab.mooctest.site.web.constants.CookieConsts;
|
|
|
import cn.iselab.mooctest.site.web.logic.VerificationLogic;
|
|
|
import com.google.code.kaptcha.impl.DefaultKaptcha;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.imageio.ImageIO;
|
|
|
@@ -24,7 +24,7 @@ import java.awt.image.BufferedImage;
|
|
|
* @author sean
|
|
|
* @date 2017-03-21.
|
|
|
*/
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
public class CaptchaController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -66,9 +66,8 @@ public class CaptchaController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = UrlConstants.API_COMMON + "captcha/mobile/{mobile:\\d+}", method = RequestMethod.POST)
|
|
|
- public boolean sendMobileCaptcha(@PathVariable("mobile") String mobile) {
|
|
|
+ public void sendMobileCaptcha(@PathVariable("mobile") String mobile) {
|
|
|
verificationLogic.sendMobileVerfication(mobile);
|
|
|
- return true;
|
|
|
}
|
|
|
|
|
|
}
|