File tree Expand file tree Collapse file tree 2 files changed +15
-18
lines changed
Chapter3-1-7/src/main/java/com/didispace Expand file tree Collapse file tree 2 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 11package com .didispace ;
22
3- import com .didispace .dto .UserDto ;
43import com .fasterxml .jackson .databind .ObjectMapper ;
54import com .fasterxml .jackson .databind .SerializationFeature ;
65import com .fasterxml .jackson .datatype .jsr310 .JavaTimeModule ;
6+ import lombok .AllArgsConstructor ;
7+ import lombok .Data ;
8+ import lombok .NoArgsConstructor ;
79import org .springframework .boot .SpringApplication ;
810import org .springframework .boot .autoconfigure .SpringBootApplication ;
911import org .springframework .context .annotation .Bean ;
1012import org .springframework .web .bind .annotation .PostMapping ;
1113import org .springframework .web .bind .annotation .RequestBody ;
1214import org .springframework .web .bind .annotation .RestController ;
1315
16+ import java .time .LocalDate ;
17+
1418/**
1519 * @author 程序猿DD
1620 * @version 1.0.0
@@ -33,6 +37,16 @@ public UserDto user(@RequestBody UserDto userDto) throws Exception {
3337
3438 }
3539
40+ @ Data
41+ @ NoArgsConstructor
42+ @ AllArgsConstructor
43+ static class UserDto {
44+
45+ private String userName ;
46+ private LocalDate birthday ;
47+
48+ }
49+
3650 @ Bean
3751 public ObjectMapper serializingObjectMapper () {
3852 ObjectMapper objectMapper = new ObjectMapper ();
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments