我们先来看service当中: ![](https://img.kancloud.cn/2e/60/2e60e2dbce6afae279d92912eca011a7_1255x944.png) ### 记得去安装这个插件 ![](https://img.kancloud.cn/b4/5a/b45a144e5433ae1bd76f055abbdf2d9f_1333x710.png) ### 然后Alt+Enter如下图所示 ![](https://img.kancloud.cn/f9/56/f956968dda226eed270304a0680b15eb_899x418.png) ### 可以选择Generate all setter no default value就会自动帮你写好所有字段的set方法 自己往里面填值即可 ### controller当中更简单 ![](https://img.kancloud.cn/bb/30/bb3037c11b9cc7f3fe54c3d8300848cf_1141x832.png) ### 前面我们讲过在项目当中我们创建了http包发送各种模拟请求 如何发送post请求呢? ![](https://img.kancloud.cn/62/a9/62a978a755db67ddf2f83293ab3443ee_1034x650.png)