Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
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
yaru
fgqyxxlr
Commits
0cec24d9
Commit
0cec24d9
authored
Mar 20, 2019
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集成组件beanutils
parent
6874736a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
pom.xml
+8
-0
ruoyi-common/pom.xml
+8
-2
ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
+2
-14
No files found.
pom.xml
View file @
0cec24d9
...
...
@@ -28,6 +28,7 @@
<oshi.version>
3.9.1
</oshi.version>
<commons.io.version>
2.5
</commons.io.version>
<commons.fileupload.version>
1.3.3
</commons.fileupload.version>
<commons.beanutils.version>
1.9.3
</commons.beanutils.version>
<jsoup.version>
1.11.3
</jsoup.version>
<poi.version>
3.17
</poi.version>
<velocity.version>
1.7
</velocity.version>
...
...
@@ -137,6 +138,13 @@
<version>
${commons.fileupload.version}
</version>
</dependency>
<!-- 简化反射封工具类 -->
<dependency>
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
<version>
${commons.beanutils.version}
</version>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>
org.jsoup
</groupId>
...
...
ruoyi-common/pom.xml
View file @
0cec24d9
...
...
@@ -47,18 +47,24 @@
<artifactId>
jackson-databind
</artifactId>
</dependency>
<!--io常用工具类 -->
<!--
io常用工具类 -->
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
</dependency>
<!--文件上传工具类 -->
<!--
文件上传工具类 -->
<dependency>
<groupId>
commons-fileupload
</groupId>
<artifactId>
commons-fileupload
</artifactId>
</dependency>
<!-- 简化反射封工具类 -->
<dependency>
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>
org.jsoup
</groupId>
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java
View file @
0cec24d9
...
...
@@ -11,7 +11,7 @@ import java.util.regex.Pattern;
*
* @author ruoyi
*/
public
class
BeanUtils
public
class
BeanUtils
extends
org
.
apache
.
commons
.
beanutils
.
BeanUtils
{
/** Bean方法名中属性名开始的下标 */
private
static
final
int
BEAN_METHOD_PROP_INDEX
=
3
;
...
...
@@ -30,21 +30,9 @@ public class BeanUtils
*/
public
static
void
copyBeanProp
(
Object
dest
,
Object
src
)
{
List
<
Method
>
destSetters
=
getSetterMethods
(
dest
);
List
<
Method
>
srcGetters
=
getGetterMethods
(
src
);
try
{
for
(
Method
setter
:
destSetters
)
{
for
(
Method
getter
:
srcGetters
)
{
if
(
isMethodPropEquals
(
setter
.
getName
(),
getter
.
getName
())
&&
setter
.
getParameterTypes
()[
0
].
equals
(
getter
.
getReturnType
()))
{
setter
.
invoke
(
dest
,
getter
.
invoke
(
src
));
}
}
}
copyProperties
(
dest
,
src
);
}
catch
(
Exception
e
)
{
...
...
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