Skip to content

Commit 62e8003

Browse files
committed
refactor(Time): 생성자에 JsonCreator, JsonProperty 추가
1 parent 6886611 commit 62e8003

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/roomescape/model/time/Time.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
package roomescape.model.time;
22

33
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonProperty;
45

56
public class Time {
67

78
private Long id;
89
private String time;
910

11+
public Time() {
12+
}
13+
1014
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
11-
public Time(String time) {
15+
public Time(@JsonProperty("time") String time) {
1216
this.time = time;
1317
}
1418

0 commit comments

Comments
 (0)