From d1d4495ade47e6f27eff52c3970c6e3eeaa49d58 Mon Sep 17 00:00:00 2001 From: kwoyke Date: Wed, 1 Jul 2020 22:11:33 +0200 Subject: [PATCH] BAEL-3265: Change port number to 8032 (#9618) * BAEL-3265-PoC: Change port number to 8032 * BAEL-3265-PoC: Change the way the default port is set --- .../src/main/java/com/baeldung/client/BurlapClient.java | 2 +- .../src/main/java/com/baeldung/client/HessianClient.java | 2 +- .../src/main/java/com/baeldung/server/Server.java | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java index 477c29eb26..1079c4163f 100644 --- a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java +++ b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/BurlapClient.java @@ -15,7 +15,7 @@ public class BurlapClient { @Bean public BurlapProxyFactoryBean burlapInvoker() { BurlapProxyFactoryBean invoker = new BurlapProxyFactoryBean(); - invoker.setServiceUrl("http://localhost:8080/b_booking"); + invoker.setServiceUrl("http://localhost:8032/b_booking"); invoker.setServiceInterface(CabBookingService.class); return invoker; } diff --git a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java index b5f366094e..b2a2f4ffae 100644 --- a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java +++ b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/src/main/java/com/baeldung/client/HessianClient.java @@ -15,7 +15,7 @@ public class HessianClient { @Bean public HessianProxyFactoryBean hessianInvoker() { HessianProxyFactoryBean invoker = new HessianProxyFactoryBean(); - invoker.setServiceUrl("http://localhost:8080/booking"); + invoker.setServiceUrl("http://localhost:8032/booking"); invoker.setServiceInterface(CabBookingService.class); return invoker; } diff --git a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java index 9b7e463871..9c825a2a80 100644 --- a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java +++ b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/src/main/java/com/baeldung/server/Server.java @@ -10,6 +10,8 @@ import org.springframework.remoting.caucho.BurlapServiceExporter; import org.springframework.remoting.caucho.HessianServiceExporter; import org.springframework.remoting.support.RemoteExporter; +import java.util.Collections; + @Configuration @ComponentScan @EnableAutoConfiguration public class Server { @Bean CabBookingService bookingService() { @@ -31,7 +33,9 @@ import org.springframework.remoting.support.RemoteExporter; } public static void main(String[] args) { - SpringApplication.run(Server.class, args); + SpringApplication app = new SpringApplication(Server.class); + app.setDefaultProperties(Collections.singletonMap("server.port", "8032")); + app.run(args); } } \ No newline at end of file