修改远程调用 配置,有的变量没改导致调用不通

server_five_liuyunhu
liuyunhu 2024-04-04 09:43:08 +08:00
parent f07dc734e4
commit 562deda30a
5 changed files with 7 additions and 6 deletions

View File

@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@FeignClient(contextId = "remoteVehicleService" ,
value = ServiceNameConstants.VEHICLE_SERVICE,
value = ServiceNameConstants.BUSINESS_SERVICE,
fallbackFactory = RemoteVehicleFallbackFactory.class,
path = "/vehicle"
)

View File

@ -48,6 +48,7 @@ public class RemoteVehicleFallbackFactory implements FallbackFactory<RemoteVehic
@Override
public Result<List<Vehicle>> findByVIN(String vin) {
log.error("车辆服务调用失败:"+cause.getMessage());
return Result.error("车辆服务调用失败:" + cause.getMessage());
}
};

View File

@ -26,8 +26,8 @@ public class ServiceNameConstants {
* @param null:
* @return null
* @author
* @description
* @description couplet-business
* @date
*/
public static final String VEHICLE_SERVICE = "couplet-vehicle";
public static final String BUSINESS_SERVICE = "couplet-business";
}

View File

@ -19,6 +19,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public class CoupletMqApplatcaion {
public static void main(String[] args) {
SpringApplication.run(CoupletMqApplatcaion.class, args);
System.out.println("获取报文、RabbitMQ模块启动成功");
System.out.println("RabbitMQ模块启动成功");
}
}

View File

@ -18,9 +18,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableMyFeignClients
@SpringBootApplication
//@EnableFeignClients
public class OnlineApplication {
public class CoupletOnlineApplication {
public static void main(String[] args) {
SpringApplication.run(OnlineApplication.class);
SpringApplication.run(CoupletOnlineApplication.class);
System.out.println("车辆上线模块启动成功");
}
}