后端接口:

1.get,调用方式 http://127.0.0.1:8088/xxxx/{id}

string boot中get、post 接口

 

 

 

代码如下:

1 /**
2      * get方式
3      */
4     @RequestMapping(value = "/xxxxx/{id}", method = RequestMethod.GET)
5     public Object xxxxx(@PathVariable int id) {
6         //以下是逻辑处理
7 
8         return xxx;
9     }
View Code

相关文章: