Commit 9cd8f443 by WeiCong

版本获取返回前台

parent 8f11806a
......@@ -2,8 +2,14 @@ package org.sss.presentation.noui.controller;
import log.Log;
import log.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.sss.presentation.noui.api.response.ErrorCodes;
import org.sss.presentation.noui.api.response.NoUiVersion;
import org.sss.presentation.noui.api.response.ResultUtil;
import org.sss.presentation.noui.common.Constants;
import javax.imageio.ImageIO;
......@@ -14,6 +20,7 @@ import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Random;
@RequestMapping("/login")
@Controller
public class VerifyCodeCreateController {
final static String STR = "QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";
......@@ -21,6 +28,15 @@ public class VerifyCodeCreateController {
private static final int width = 100;//验证码图片宽度
private static final int height = 50;//验证码图片高度
@Autowired
private NoUiVersion noUiVersion;
@ResponseBody
@RequestMapping(value ="/version", method = RequestMethod.GET)
public Object version(HttpServletRequest request, HttpServletResponse response) {
return ResultUtil.result(ErrorCodes.SUCCESS, ErrorCodes.SUCCESS_INFO, null, noUiVersion.getVersion());
}
@RequestMapping("/VerifyCode")
public void create(HttpServletRequest request, HttpServletResponse response) {
drawVerifyCode(request, response);
......
......@@ -24,7 +24,7 @@
<mvc:mapping path="/**" />
<!--login 不需要拦截 -->
<mvc:exclude-mapping path="/login" />
<mvc:exclude-mapping path="/VerifyCode" />
<mvc:exclude-mapping path="/login/**" />
<mvc:exclude-mapping path="/fileBrowser/**" />
<bean class="org.sss.presentation.noui.jwt.TokenInterceptor"></bean>
</mvc:interceptor>
......@@ -45,7 +45,7 @@
</bean>
<bean id="noUiVersion" class="org.sss.presentation.noui.api.response.NoUiVersion">
<property name="version" value="V1.0.0" />
<property name="version" value="202009091600" />
<property name="rootFilePath" value="f:/" />
</bean>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment