Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
5c9855fc
Commit
5c9855fc
authored
Aug 16, 2017
by
stylefeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理包结构
parent
3647b776
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
88 additions
and
28 deletions
+88
-28
guns-core/src/main/java/com/stylefeng/guns/core/qr/ImgQrTool.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageConfig.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageWriter.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/qr/QrImage.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/BasicType.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/BeanKit.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/support/ClassKit.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/support/CollectionKit.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/support/DateTime.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/DateTimeKit.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/support/HexKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/HttpKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/ObjectKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/PageKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/StrKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/WafKit.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/WafRequestWrapper.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/support/exception/ToolBoxException.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/util/Convert.java
+2
-2
guns-core/src/main/java/com/stylefeng/guns/core/util/SimpleContrast.java
+59
-0
guns-core/src/main/java/com/stylefeng/guns/core/util/ToolUtil.java
+2
-1
guns-core/src/main/java/com/stylefeng/guns/core/xss/XssFilter.java
+1
-1
guns-core/src/main/java/com/stylefeng/guns/core/xss/XssHttpServletRequestWrapper.java
+1
-1
No files found.
guns-core/src/main/java/com/stylefeng/guns/core/
util/
qr/ImgQrTool.java
→
guns-core/src/main/java/com/stylefeng/guns/core/qr/ImgQrTool.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
qr
;
package
com
.
stylefeng
.
guns
.
core
.
qr
;
import
com.google.zxing.BarcodeFormat
;
import
com.google.zxing.EncodeHintType
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
qr/MatrixToImageConfig.java
→
guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageConfig.java
View file @
5c9855fc
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
qr
;
package
com
.
stylefeng
.
guns
.
core
.
qr
;
import
java.awt.image.BufferedImage
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
qr/MatrixToImageWriter.java
→
guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageWriter.java
View file @
5c9855fc
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
qr
;
package
com
.
stylefeng
.
guns
.
core
.
qr
;
import
com.google.zxing.common.BitMatrix
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
qr/QrImage.java
→
guns-core/src/main/java/com/stylefeng/guns/core/qr/QrImage.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
qr
;
package
com
.
stylefeng
.
guns
.
core
.
qr
;
/**
* 二维码图片对象
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/BasicType.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/BasicType.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/BeanKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/BeanKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
com.stylefeng.guns.core.support.exception.ToolBoxException
;
import
com.stylefeng.guns.core.util.Convert
;
import
com.stylefeng.guns.core.util.support.exception.ToolBoxException
;
import
java.beans.*
;
import
java.lang.reflect.Method
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/ClassKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/ClassKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
com.stylefeng.guns.core.
util.
support.exception.ToolBoxException
;
import
com.stylefeng.guns.core.support.exception.ToolBoxException
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/CollectionKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/CollectionKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
com.stylefeng.guns.core.
util.
support.exception.ToolBoxException
;
import
com.stylefeng.guns.core.support.exception.ToolBoxException
;
import
java.lang.reflect.Array
;
import
java.util.*
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/DateTime.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/DateTime.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
java.util.Date
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/DateTimeKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/DateTimeKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
com.stylefeng.guns.core.
util.
support.exception.ToolBoxException
;
import
com.stylefeng.guns.core.support.exception.ToolBoxException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/HexKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/HexKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
java.nio.charset.Charset
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/HttpKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/HttpKit.java
View file @
5c9855fc
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/ObjectKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/ObjectKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
/**
* 一些通用的函数
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/PageKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/PageKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
/**
* 分页工具类
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/StrKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/StrKit.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
java.io.StringReader
;
import
java.io.StringWriter
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/WafKit.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/WafKit.java
View file @
5c9855fc
...
...
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
java.util.regex.Pattern
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/WafRequestWrapper.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/WafRequestWrapper.java
View file @
5c9855fc
...
...
@@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
;
package
com
.
stylefeng
.
guns
.
core
.
support
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletRequest
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
support/exception/ToolBoxException.java
→
guns-core/src/main/java/com/stylefeng/guns/core/support/exception/ToolBoxException.java
View file @
5c9855fc
...
...
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
stylefeng
.
guns
.
core
.
util
.
support
.
exception
;
package
com
.
stylefeng
.
guns
.
core
.
support
.
exception
;
import
com.stylefeng.guns.core.
util.
support.StrKit
;
import
com.stylefeng.guns.core.support.StrKit
;
/**
* 工具类初始化异常
...
...
guns-core/src/main/java/com/stylefeng/guns/core/util/Convert.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
;
import
com.stylefeng.guns.core.
util.
support.*
;
import
com.stylefeng.guns.core.
util.
support.exception.ToolBoxException
;
import
com.stylefeng.guns.core.support.*
;
import
com.stylefeng.guns.core.support.exception.ToolBoxException
;
import
java.io.UnsupportedEncodingException
;
import
java.math.BigDecimal
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/util/SimpleContrast.java
0 → 100644
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
;
import
java.beans.PropertyDescriptor
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.util.Date
;
/**
* 对比两个对象的变化的工具类
*
* @author fengshuonan
* @Date 2017/3/31 10:36
*/
public
class
SimpleContrast
{
//记录每个修改字段的分隔符
public
static
final
String
separator
=
";;;"
;
/**
* 比较两个对象,并返回不一致的信息
*
* @author stylefeng
* @Date 2017/5/9 19:34
*/
public
static
String
contrastObj
(
Object
pojo1
,
Object
pojo2
)
{
String
str
=
""
;
try
{
Class
clazz
=
pojo1
.
getClass
();
Field
[]
fields
=
pojo1
.
getClass
().
getDeclaredFields
();
int
i
=
1
;
for
(
Field
field
:
fields
)
{
if
(
"serialVersionUID"
.
equals
(
field
.
getName
()))
{
continue
;
}
PropertyDescriptor
pd
=
new
PropertyDescriptor
(
field
.
getName
(),
clazz
);
Method
getMethod
=
pd
.
getReadMethod
();
Object
o1
=
getMethod
.
invoke
(
pojo1
);
Object
o2
=
getMethod
.
invoke
(
pojo2
);
if
(
o1
==
null
||
o2
==
null
)
{
continue
;
}
if
(
o1
instanceof
Date
)
{
o1
=
DateUtil
.
getDay
((
Date
)
o1
);
}
if
(!
o1
.
toString
().
equals
(
o2
.
toString
()))
{
if
(
i
!=
1
)
{
str
+=
separator
;
}
str
+=
"字段名称"
+
field
.
getName
()
+
",旧值:"
+
o1
+
",新值:"
+
o2
;
i
++;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
str
;
}
}
\ No newline at end of file
guns-core/src/main/java/com/stylefeng/guns/core/util/ToolUtil.java
View file @
5c9855fc
...
...
@@ -15,7 +15,8 @@
*/
package
com
.
stylefeng
.
guns
.
core
.
util
;
import
com.stylefeng.guns.core.util.support.StrKit
;
import
com.stylefeng.guns.core.support.StrKit
;
import
java.io.IOException
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
xss/XssFilter.java
→
guns-core/src/main/java/com/stylefeng/guns/core/xss/XssFilter.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
xss
;
package
com
.
stylefeng
.
guns
.
core
.
xss
;
import
javax.servlet.*
;
...
...
guns-core/src/main/java/com/stylefeng/guns/core/
util/
xss/XssHttpServletRequestWrapper.java
→
guns-core/src/main/java/com/stylefeng/guns/core/xss/XssHttpServletRequestWrapper.java
View file @
5c9855fc
package
com
.
stylefeng
.
guns
.
core
.
util
.
xss
;
package
com
.
stylefeng
.
guns
.
core
.
xss
;
import
javax.servlet.http.HttpServletRequest
;
...
...
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