Skip to content

Commit b2cff2c

Browse files
author
bulezeng(曾卫进)
committed
xingePush#27 Platform 等枚举变量json 序列化 取值修改为name 字段
1 parent 0cc69ad commit b2cff2c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/java/com/tencent/xinge/bean/Environment.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.fasterxml.jackson.annotation.JsonFormat;
44
import com.fasterxml.jackson.annotation.JsonInclude;
5+
import com.fasterxml.jackson.annotation.JsonValue;
56
import io.swagger.annotations.ApiModel;
67
import io.swagger.annotations.ApiModelProperty;
78

@@ -25,6 +26,7 @@ public int getType() {
2526
}
2627

2728

29+
@JsonValue
2830
public String getName() {
2931
return name;
3032
}

src/main/java/com/tencent/xinge/bean/Platform.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ public enum Platform {
2525
this.name = name;
2626
}
2727

28-
@JsonValue
28+
2929
public int getType() {
3030
return type;
3131
}
3232

33+
@JsonValue
3334
public String getName() {
3435
return name;
3536
}

0 commit comments

Comments
 (0)