Test Passed:
But check progress failed:
| @Configuration | |
| @Profile("routes-filter") | |
| class FilterConfiguration { | |
| companion object { | |
| private val log = Loggers.getLogger(FilterConfiguration::class.java) | |
| } | |
| @Bean | |
| fun filterGateway(builder: RouteLocatorBuilder): RouteLocator = | |
| builder.routes() |
| diff --git a/README.md b/README.md | |
| index ced9bd0..d30d6ec 100644 | |
| --- a/README.md | |
| +++ b/README.md | |
| @@ -53,6 +53,9 @@ Each module is implemented in both [Java](./java) and [Kotlin](./kotlin) to comp | |
| - Implemented parallel Kotlin versions of Java examples | |
| - Updated to Spring Boot 3.5.x while the book uses an older Spring Boot version 2.5.0 | |
| - Adopted a monorepo approach with [Gradle Multi-project Builds][gradle-multiproject] and [Gradle Composite Builds][gradle-composite-builds] to manage both Java and Kotlin implementations in a single repository | |
| + - Learned that Gradle Kotlin DSL supports both type-safe and string-based dependency declarations, and that the string-based form was required | |
| + in [`08:rsocket/build.gradle.kts`](./kotlin/08-rsocket/build.gradle.kts) when adding dependencies inside `afterEvaluate` |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.function.Function; | |
| class PricingDiscountApp { | |
| public static void main(String[] args) { | |
| final var customer1 = new Customer("1", "John Doe", CustomerType.VIP); | |
| final var customer2 = new Customer("2", "Jane Doe", CustomerType.REGULAR); | |
| final var customer3 = new Customer("3", "Business Corp", CustomerType.BUSINESS); |
| import java.time.LocalDateTime; | |
| import java.util.List; | |
| import java.util.function.Function; | |
| import java.util.stream.Collectors; | |
| class DocumentProcessorApp { | |
| public static void main(String[] args) { | |
| final var trinity = new Submitter("trin123"); | |
| final var morpheus = new Approver("morph456"); |
| import java.math.BigDecimal; | |
| import java.time.Duration; | |
| import java.time.LocalDateTime; | |
| import java.util.*; | |
| import java.util.stream.Collector; | |
| import java.util.stream.Collectors; | |
| class TripAnalyzerApp1 { | |
| private static final List<Trip> TRIPS = List.of( | |
| new Trip(TripType.BUSINESS, "Tokyo", Duration.ofHours(5),LocalDateTime.of(2025, 5, 25, 8, 0), "Thomas Anderson", new BigDecimal("1200.00")), |
| import static java.time.temporal.ChronoUnit.HOURS; | |
| import java.time.Instant; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Optional; | |
| import java.util.concurrent.atomic.AtomicLong; | |
| import java.util.function.Function; | |
| import java.util.function.Supplier; |
| sealed interface Permission permits Read, Write {} | |
| record Read() implements Permission {} | |
| record Write() implements Permission {} | |
| record Execute() {} | |
| class ResourceAction { | |
| public String perform(Permission permission) { | |
| return String.format("Performing action with %s...", permission.getClass().getSimpleName()); | |
| } |
| // Basic domain record | |
| public record Customer(String id, String email) {} |
| import java.util.*; | |
| import java.util.function.Predicate; | |
| import java.util.stream.Stream; | |
| class TestUtils { | |
| public static <Expected, Actual> void test(Expected expectedResult, Actual actualResult) { | |
| // System.out.printf("Expected=%s | Actual=%s\n", expectedResult, actualResult); | |
| final var expectedResultOpt = Optional.ofNullable(expectedResult); | |
| final var actualResultOpt = Optional.ofNullable(actualResult); |