Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lzh_me
Sureness
提交
0ce668e2
Sureness
项目概览
lzh_me
/
Sureness
与 Fork 源项目一致
Fork自
sureness / Sureness
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Sureness
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0ce668e2
编写于
3月 08, 2020
作者:
sinat_25235033
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify common dependency
上级
d204eb26
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
10 deletion
+39
-10
core/pom.xml
core/pom.xml
+6
-6
pom.xml
pom.xml
+31
-0
sample-bootstrap/src/main/java/com/usthe/sureness/sample/bootstrap/controller/AccountController.java
...reness/sample/bootstrap/controller/AccountController.java
+2
-4
未找到文件。
core/pom.xml
浏览文件 @
0ce668e2
...
...
@@ -6,13 +6,16 @@
<artifactId>
sureness
</artifactId>
<groupId>
com.usthe.sureness
</groupId>
<version>
0.0.2
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
sureness-core
</artifactId>
<name>
sureness
</name>
<url>
https://github.com/tomsun28/sureness
</url>
<description>
The Protection For Restful Api
</description>
<description>
Sureness is a simple and efficient open-source security framework that focus on protection for restful api.
</description>
<version>
0.0.2
</version>
<licenses>
...
...
@@ -43,21 +46,20 @@
</scm>
<properties>
<slf4j.version>
1.7.21
</slf4j.version>
<jjwt.version>
0.9.0
</jjwt.version>
<yaml.version>
1.17
</yaml.version>
<servlet.api.version>
3.1.0
</servlet.api.version>
</properties>
<dependencies>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
3.1.0
</version>
<version>
${servlet.api.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<!-- jwt util -->
<dependency>
...
...
@@ -76,12 +78,10 @@
<dependency>
<groupId>
javax.xml.bind
</groupId>
<artifactId>
jaxb-api
</artifactId>
<version>
2.3.0
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
...
...
pom.xml
浏览文件 @
0ce668e2
...
...
@@ -17,8 +17,39 @@
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<java.version>
1.8
</java.version>
<slf4j.version>
1.7.21
</slf4j.version>
<xml.bind.version>
2.3.0
</xml.bind.version>
<!-- Test 3rd-party dependencies: -->
<junit.version>
4.12
</junit.version>
<easymock.version>
4.0.2
</easymock.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
javax.xml.bind
</groupId>
<artifactId>
jaxb-api
</artifactId>
<version>
${xml.bind.version}
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<dependency>
<groupId>
org.easymock
</groupId>
<artifactId>
easymock
</artifactId>
<version>
${easymock.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
...
...
sample-bootstrap/src/main/java/com/usthe/sureness/sample/bootstrap/controller/AccountController.java
浏览文件 @
0ce668e2
...
...
@@ -10,12 +10,9 @@ import org.springframework.http.HttpStatus;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestPart
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
...
...
@@ -28,6 +25,7 @@ import java.util.UUID;
@RestController
()
public
class
AccountController
{
private
static
final
String
APP_ID
=
"appId"
;
/**
* 账户数据提供
*/
...
...
@@ -41,7 +39,7 @@ public class AccountController {
*/
@PostMapping
(
"/api/v1/account/auth"
)
public
ResponseEntity
<
Object
>
login
(
@RequestBody
Map
<
String
,
String
>
requestBody
)
{
if
(
requestBody
==
null
||
!
requestBody
.
containsKey
(
"appId"
)
if
(
requestBody
==
null
||
!
requestBody
.
containsKey
(
APP_ID
)
||
!
requestBody
.
containsKey
(
"password"
))
{
return
ResponseEntity
.
badRequest
().
build
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录