1.spring的controller是不可以接受json参数的,只有restcontroller可以
2.如果在controller下想传json格式的对象,必须使用requestBody注解才可以,或者使用map格式的入参,request 和 response不会自动封装参数到map中
1.spring的controller是不可以接受json参数的,只有restcontroller可以
2.如果在controller下想传json格式的对象,必须使用requestBody注解才可以,或者使用map格式的入参,request 和 response不会自动封装参数到map中
本文标题:今天遇到的spring的坑
本文链接:https://www.haomeiwen.com/subject/tqqhyftx.html
网友评论