feat():修复forest请求nacospi接口为路径参数的问题

master
86191 2024-08-06 19:38:23 +08:00
parent 526ae6a395
commit b469085934
2 changed files with 4 additions and 3 deletions

View File

@ -4,6 +4,7 @@ package com.muyu.common.nacos.remote;
import com.dtflys.forest.annotation.BaseRequest; import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Body; import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.GetRequest; import com.dtflys.forest.annotation.GetRequest;
import com.dtflys.forest.annotation.Query;
import com.muyu.common.core.constant.Constants; import com.muyu.common.core.constant.Constants;
import com.muyu.common.nacos.remote.interceptor.NacosNamespaceInterceptor; import com.muyu.common.nacos.remote.interceptor.NacosNamespaceInterceptor;
import com.muyu.common.nacos.remote.req.ServiceListReq; import com.muyu.common.nacos.remote.req.ServiceListReq;
@ -20,5 +21,5 @@ public interface NacosServiceRemote {
@GetRequest( @GetRequest(
url = "/list" url = "/list"
) )
public ServiceListResp serviceList(@Body ServiceListReq serviceListReq); public ServiceListResp serviceList(@Query ServiceListReq serviceListReq);
} }

View File

@ -18,7 +18,7 @@ public class NacosService {
private NacosServiceRemote nacosServiceRemote; private NacosServiceRemote nacosServiceRemote;
public List<String> nacosServerAllList() { public List<String> nacosServerAllList() {
ArrayList<String> serverList = new ArrayList<>(); List<String> serverList = new ArrayList<>();
ServiceListResp serviceListResp = null; ServiceListResp serviceListResp = null;
int pageNo = 0,pageSize = 2; int pageNo = 0,pageSize = 2;
do { do {