The springboot request parameter is a class that contains list

such as the title.

background controller:

@RequestMapping("generatorOrder")
    public TMessage generatorOrder(Order order) {
        ...
    }

order class:

public class Order implements Serializable {
    
    
    private Long orderId;
    
    private BigDecimal sum;
    /**
     * 
     */
    private Timestamp gmtCreate;
    private transient List<OrderDetail> detailList;
}

this is my test result:

clipboard.png


stringlist


clipboard.png

how should string, be received correctly if the background request parameters are not changed to the json format of the order class?
the picture is a little blurry, please click to view the original picture

Mar.01,2021

1 create a new class

  

add requestbody comments to the parameter.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e821f4-bae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e821f4-bae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?