1、啓動失敗web
加spring
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
2、訪問不了接口:若是加了ComponentScan註解,則必須包含controller所在的路徑 json
3、接口調用api
一、查詢app
二、新增spring-boot
(1)報錯,糾結於參數傳遞方式 post
(2)ApiPost支持多種請求參數類型 https://doc.apipost.cn/15d046a66883807durl
(3)@RequestBody註解的參數,能接收Content-Type爲application/json的請求的參數值,要接收application/x-www-form-urlencoded的參數還需作點工做 https://blog.csdn.net/justry_deng/article/details/998755.net
(4)被@RequestBody註解的參數,既能接收Content-Type爲application/json的請求的參數值,又能接收Content-Type爲application/x-www-form-urlencoded的請求的參數值 code
(5)上面那麼麻煩,其實把RequestBody去了就行了,就沒那麼多事了。
三、刪除
四、更新