Merge remote-tracking branch 'origin/server_five_liuyunhu' into server_five

server_five_liuyunhu
lijiayao 2024-04-04 09:48:29 +08:00
commit 93ccc7535e
6 changed files with 8 additions and 6 deletions

View File

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

View File

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

View File

@ -26,8 +26,8 @@ public class ServiceNameConstants {
* @param null: * @param null:
* @return null * @return null
* @author * @author
* @description * @description couplet-business
* @date * @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 class CoupletMqApplatcaion {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(CoupletMqApplatcaion.class, 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 @EnableMyFeignClients
@SpringBootApplication @SpringBootApplication
//@EnableFeignClients //@EnableFeignClients
public class OnlineApplication { public class CoupletOnlineApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(OnlineApplication.class); SpringApplication.run(CoupletOnlineApplication.class);
System.out.println("车辆上线模块启动成功"); System.out.println("车辆上线模块启动成功");
} }
} }