Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mica
mica
提交
1a789d25
mica
项目概览
mica
/
mica
通知
10
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
mica
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1a789d25
编写于
1月 30, 2019
作者:
如梦技术
🐛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
📝
记录 问题
上级
40db10f0
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
25 addition
and
0 deletion
+25
-0
README.md
README.md
+7
-0
mica-core/src/test/java/net/dreamlu/mica/test/bean/MapToBeanTest.java
...c/test/java/net/dreamlu/mica/test/bean/MapToBeanTest.java
+11
-0
mica-core/src/test/java/net/dreamlu/mica/test/utils/User.java
...-core/src/test/java/net/dreamlu/mica/test/utils/User.java
+4
-0
mica-core/src/test/java/net/dreamlu/mica/test/utils/User1.java
...core/src/test/java/net/dreamlu/mica/test/utils/User1.java
+3
-0
未找到文件。
README.md
浏览文件 @
1a789d25
...
@@ -46,6 +46,13 @@
...
@@ -46,6 +46,13 @@
## 文档
## 文档
文档编写中,敬请期待...
文档编写中,敬请期待...
## 已知问题
lombok 生成的 method 问题:https://github.com/rzwitserloot/lombok/issues/1861
对于 xX 类属性名,第一个小写,第二个大写的 bean 属性名,Map -> Bean 或 Bean -> Map 存在问题。
不打算做兼容,待 lombok 新版修复。
## 协议
## 协议
![
LGPL v3
](
docs/img/lgplv3-147x51.png
)
![
LGPL v3
](
docs/img/lgplv3-147x51.png
)
...
...
mica-core/src/test/java/net/dreamlu/mica/test/bean/MapToBeanTest.java
浏览文件 @
1a789d25
...
@@ -27,9 +27,17 @@ public class MapToBeanTest {
...
@@ -27,9 +27,17 @@ public class MapToBeanTest {
map
.
put
(
"six"
,
"女"
);
map
.
put
(
"six"
,
"女"
);
map
.
put
(
"gender"
,
"男"
);
map
.
put
(
"gender"
,
"男"
);
map
.
put
(
"xx"
,
"xx"
);
map
.
put
(
"xx"
,
"xx"
);
map
.
put
(
"xInt"
,
100
);
map
.
put
(
"xxInt"
,
101
);
map
.
put
(
"xLong"
,
10000L
);
User1
user1
=
BeanUtil
.
copy
(
map
,
User1
.
class
);
User1
user1
=
BeanUtil
.
copy
(
map
,
User1
.
class
);
System
.
out
.
println
(
user1
);
System
.
out
.
println
(
user1
);
System
.
out
.
println
(
BeanUtil
.
toMap
(
user1
));
User1
userx
=
new
User1
();
BeanUtil
.
copy
(
user1
,
userx
);
System
.
out
.
println
(
userx
);
User1
user2
=
BeanUtil
.
copyWithConvert
(
map
,
User1
.
class
);
User1
user2
=
BeanUtil
.
copyWithConvert
(
map
,
User1
.
class
);
System
.
out
.
println
(
user2
);
System
.
out
.
println
(
user2
);
...
@@ -39,5 +47,8 @@ public class MapToBeanTest {
...
@@ -39,5 +47,8 @@ public class MapToBeanTest {
User
user4
=
BeanUtil
.
copyWithConvert
(
map
,
User
.
class
);
User
user4
=
BeanUtil
.
copyWithConvert
(
map
,
User
.
class
);
System
.
out
.
println
(
user4
);
System
.
out
.
println
(
user4
);
User
user5
=
BeanUtil
.
copy
(
user2
,
User
.
class
);
System
.
out
.
println
(
user5
);
}
}
}
}
mica-core/src/test/java/net/dreamlu/mica/test/utils/User.java
浏览文件 @
1a789d25
package
net.dreamlu.mica.test.utils
;
package
net.dreamlu.mica.test.utils
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.ToString
;
import
net.dreamlu.mica.core.beans.CopyProperty
;
import
net.dreamlu.mica.core.beans.CopyProperty
;
@Data
@Data
...
@@ -11,4 +12,7 @@ public class User {
...
@@ -11,4 +12,7 @@ public class User {
private
String
xx
;
private
String
xx
;
@CopyProperty
(
"six"
)
@CopyProperty
(
"six"
)
private
String
gender
;
private
String
gender
;
private
int
xInt
;
private
int
xxInt
;
private
long
xLong
;
}
}
mica-core/src/test/java/net/dreamlu/mica/test/utils/User1.java
浏览文件 @
1a789d25
...
@@ -18,4 +18,7 @@ public class User1 {
...
@@ -18,4 +18,7 @@ public class User1 {
@CopyProperty
(
ignore
=
true
)
@CopyProperty
(
ignore
=
true
)
private
Integer
xx
;
private
Integer
xx
;
private
List
<
String
>
data
;
private
List
<
String
>
data
;
private
int
xInt
;
private
Integer
xxInt
;
private
long
xLong
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录