Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
9a48edb6
Commit
9a48edb6
authored
Aug 22, 2019
by
李秋伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request mall/arch/matrix!18
parents
6870379d
b55f0852
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
2 deletions
+47
-2
pom.xml
common-util/pom.xml
+13
-0
BeanUtil.java
common-util/src/main/java/com/secoo/mall/common/util/bean/BeanUtil.java
+1
-0
ObjectUtils.java
common-util/src/main/java/com/secoo/mall/common/util/object/ObjectUtils.java
+2
-1
ResponseUtil.java
common-util/src/main/java/com/secoo/mall/common/util/response/ResponseUtil.java
+13
-0
WebUtil.java
common-util/src/main/java/com/secoo/mall/common/util/web/WebUtil.java
+1
-1
pom.xml
pom.xml
+17
-0
No files found.
common-util/pom.xml
View file @
9a48edb6
...
...
@@ -46,9 +46,22 @@
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-web
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<scope>
provided
</scope>
<optional>
true
</optional>
</dependency>
</dependencies>
...
...
common-util/src/main/java/com/secoo/mall/common/util/bean/BeanUtil.java
View file @
9a48edb6
...
...
@@ -23,6 +23,7 @@ public class BeanUtil extends BeanUtils {
return
ArrayUtils
.
contains
(
arr
,
obj
);
}
public
static
<
T
>
Object
getFieldValueByName
(
T
obj
,
String
fieldName
)
throws
Exception
{
Class
clazz
=
obj
.
getClass
();
Field
field
=
clazz
.
getDeclaredField
(
fieldName
);
...
...
common-util/src/main/java/com/secoo/mall/common/util/object/ObjectUtils.java
View file @
9a48edb6
...
...
@@ -5,8 +5,9 @@ import java.util.Map;
import
java.util.Set
;
/**
*
Created by liumingming on 2018/6/13.
*
推荐使用CollectionUtil相关方法
*/
@Deprecated
public
class
ObjectUtils
{
/**
...
...
common-util/src/main/java/com/secoo/mall/common/util/response/ResponseUtil.java
View file @
9a48edb6
package
com
.
secoo
.
mall
.
common
.
util
.
response
;
import
com.secoo.mall.common.constant.CommonConstant
;
import
com.secoo.mall.common.core.bean.BizResponse
;
import
com.secoo.mall.common.core.bean.Response
;
import
com.secoo.mall.common.core.exception.BusinessException
;
...
...
@@ -21,4 +22,16 @@ public interface ResponseUtil {
return
response
;
}
/**
* 业务BizResponse处理
*
* @param data
* @param <T>
* @return
*/
static
<
T
>
BizResponse
getSuccessBizResponse
(
T
data
)
{
BizResponse
response
=
new
BizResponse
(
CommonConstant
.
Success
.
CODE
,
CommonConstant
.
Success
.
MSG
);
response
.
setData
(
data
);
return
response
;
}
}
protocol-starter/src/main/java/com/secoo/mall/web/util
/WebUtil.java
→
common-util/src/main/java/com/secoo/mall/common/util/web
/WebUtil.java
View file @
9a48edb6
package
com
.
secoo
.
mall
.
web
.
util
;
package
com
.
secoo
.
mall
.
common
.
util
.
web
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
...
...
pom.xml
View file @
9a48edb6
...
...
@@ -210,6 +210,23 @@
</exclusion>
</exclusions>
</dependency>
<!--zookeeper-->
<dependency>
<groupId>
org.apache.dubbo
</groupId>
<artifactId>
dubbo-dependencies-zookeeper
</artifactId>
<version>
${dubbo.version}
</version>
<type>
pom
</type>
<exclusions>
<exclusion>
<artifactId>
log4j
</artifactId>
<groupId>
log4j
</groupId>
</exclusion>
<exclusion>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--rocketmq-->
<dependency>
<groupId>
org.apache.rocketmq
</groupId>
...
...
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