Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gechengyang
nouiWithSpringMVC
Commits
9cd8f443
Commit
9cd8f443
authored
Sep 09, 2020
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本获取返回前台
parent
8f11806a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
VerifyCodeCreateController.java
...sentation/noui/controller/VerifyCodeCreateController.java
+16
-0
spring-mvc.xml
src/main/resources/spring-mvc.xml
+2
-2
No files found.
src/main/java/org/sss/presentation/noui/controller/VerifyCodeCreateController.java
View file @
9cd8f443
...
...
@@ -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
);
...
...
src/main/resources/spring-mvc.xml
View file @
9cd8f443
...
...
@@ -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=
"
20200909160
0"
/>
<property
name=
"rootFilePath"
value=
"f:/"
/>
</bean>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment