BAEL-8824 Align module names, folder names and artifact id
- Folder name changes
This commit is contained in:
31
spring-remoting/remoting-http/remoting-http-client/pom.xml
Normal file
31
spring-remoting/remoting-http/remoting-http-client/pom.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>remoting-http-client</artifactId>
|
||||
<description>Shows how to invoke a remote service using Spring Remoting HTTP.</description>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>remoting-http</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>${project.groupId}</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.baeldug.client;
|
||||
|
||||
import com.baeldung.api.BookingException;
|
||||
import com.baeldung.api.CabBookingService;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
|
||||
|
||||
import static java.lang.System.out;
|
||||
|
||||
@Configuration
|
||||
public class Client {
|
||||
|
||||
@Bean
|
||||
public HttpInvokerProxyFactoryBean invoker() {
|
||||
HttpInvokerProxyFactoryBean invoker = new HttpInvokerProxyFactoryBean();
|
||||
invoker.setServiceUrl("http://localhost:8080/booking");
|
||||
invoker.setServiceInterface(CabBookingService.class);
|
||||
return invoker;
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws BookingException {
|
||||
CabBookingService service = SpringApplication.run(Client.class, args).getBean(CabBookingService.class);
|
||||
out.println(service.bookRide("13 Seagate Blvd, Key Largo, FL 33037"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
|
||||
</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user