嵌套的Json对象和Wrapper DTO无法正常工作

时间:2017-04-12 09:22:38

标签: spring-boot jhipster

我有一个结构

的json
`Object {ask: "1111111111111111111111111111111111", newrationcardapplicationdto: Object, newrationcardmemberdto: Array(1), newrationcardaddressapplicationdto: Array(2)}`

和具有结构的Wrapper DTO

 `public class NewRationCardApplicationWrapperDTO {
    private static final Logger log = Logger.getLogger(NewRationCardApplicationWrapperDTO.class.getName());

    private String ask;

    public ArrayList<NewRationCardAddressApplicationDTO> newRationCardAddressApplicationDTO;

    public NewRationCardApplicationDTO newRationCardApplicationDTO;

    public ArrayList<NewRationCardMemberDTO> newRationCardMemberDTO;`

和控制器一样

@PostMapping("/newrationcardapplication") @Timed @Secured(AuthoritiesConstants.DEO) public ResponseEntity<Void> createUser(@RequestBody NewRationCardApplicationWrapperDTO newRationCardApplicationWrapperDTO) throws URISyntaxException { log.debug("REST request for New Ration Card : {}", newRationCardApplicationWrapperDTO);

但是除了ask字符串之外,所有其他嵌套的DTO都是null。 请指导

0 个答案:

没有答案