BAEL-553 - Intro to Spring Remoting with HTTP Invokers (#998)

* First test with log4j rolling appenders

* small fix

* Log4j rolling appender

* First set up with rolling file on log4j 2

* Added logback code.

* log4j2 more detailed example

* log4j2 more detailed example

* Improved names and examples

* Fixed configurations

* improved configs

* formatted

* Final fix

* fixed formatting

* Formatting fix

* Fix sample apps to avoid try / catch

* Fix request to replace files

* Fix end lines

* Log4j2 logger is shot down at the end.

* Initial commit, the server starts launched from maven

* made room for client and server projects

* made room for client and server projects

* base example works

* poms restructured

* packages restructured

* packages restructured

* Some renaming and a proper formatting string

* Small renamings

* Small renamings

* Fixed invoked URL in client through fixing bean name

* java.time.* instead of java.util.Date

* java.time.* instead of java.util.Date

* Removed log on file, kepts log on console

* Updated Spring and Logback version to latest release.

* Exception removed from run()
This commit is contained in:
Daniele Demichelis
2017-01-17 05:00:33 +01:00
committed by KevinGilmore
parent 5cc5d7dc12
commit 5c99b291d5
6 changed files with 19 additions and 34 deletions
@@ -1,18 +1,18 @@
package com.baeldung.api;
import java.io.Serializable;
import java.util.Date;
import java.time.LocalDateTime;
public class Booking implements Serializable {
private int costInCent;
private int etaInSeconds;
private String bookingCode;
private Date pickUptime;
private LocalDateTime pickUptime;
private Address pickUpAddress;
private Address dropOffAddress;
public Booking(Address pickUpAddress, Date pickUptime, Address dropOffAddress, int costInCent, int etaInSeconds, String bookingCode) {
public Booking(Address pickUpAddress, LocalDateTime pickUptime, Address dropOffAddress, int costInCent, int etaInSeconds, String bookingCode) {
this.costInCent = costInCent;
this.etaInSeconds = etaInSeconds;
this.bookingCode = bookingCode;
@@ -33,7 +33,7 @@ public class Booking implements Serializable {
return bookingCode;
}
public Date getPickUptime() {
public LocalDateTime getPickUptime() {
return pickUptime;
}
@@ -42,12 +42,11 @@ public class Booking implements Serializable {
}
@Override public String toString() {
return String.format("Booking: pick up @ %tr in %s, drop down in %s after %d minutes, %.2f $.", pickUptime, pickUpAddress, dropOffAddress, etaInSeconds/60, costInCent/100.0);
return String.format("Booking: pick up @ %tr in %s, drop down in %s after %d minutes, %.2f $.", pickUptime, pickUpAddress, dropOffAddress, etaInSeconds / 60, costInCent / 100.0);
}
public static void main(String[] args) throws InterruptedException {
System.out.println(
new Booking(new Address("a", "b"), new Date(), new Address("c", "d"), 123_00, 600, "abc")
);
System.out.println(new Booking(new Address("a", "b"),
LocalDateTime.now(), new Address("c", "d"), 123_00, 600, "abc"));
}
}