文件名称:spring-rest-client:Spring休息客户
文件大小:175KB
文件格式:ZIP
更新时间:2024-05-21 11:24:13
Java
Spring休息客户 Spring休息客户 可以使用spring mvc编写rest api,如下所示: @RestController @RequestMapping ( " /another " ) public class AnotherController { @RequestMapping ( " /add " ) public int add ( @RequestParam ( " offset " ) int offset ) { // do something return offset ; } } 可以这样声明一个休息客户: @RequestMapping ( " /another " ) @SpringRestClientEnabled ( baseUrl = " http://localhost:8080 "