Skip to content

Commit

Permalink
chore: clean codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Nov 9, 2023
2 parents 900304c + 934a85b commit 25c7631
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following table list all sample codes related to the above posts.
| [cache](https://github.com/hantsy/spring-reactive-sample/tree/master/cache) | Example of Cache Aync/Reactive support(with in-memory `ConcurrentHashMap`) |
| [cache-caffeine](https://github.com/hantsy/spring-reactive-sample/tree/master/cache-caffeine) | Example of Cache Aync/Reactive support with Caffeine |
| [cache-redis](https://github.com/hantsy/spring-reactive-sample/tree/master/cache-redis) | Example of Cache Aync/Reactive support with Redis |
| [event](https://github.com/hantsy/spring-reactive-sample/tree/master/event) | Application Event Reactive Example
| [kotlin](https://github.com/hantsy/spring-reactive-sample/tree/master/kotlin) | Written in kotlin |
| [kotlin-routes](https://github.com/hantsy/spring-reactive-sample/tree/master/kotlin-routes) | Use kotlin functional approach to declare beans and bootstrap the application programmatically |
| [kotlin-dsl](https://github.com/hantsy/spring-reactive-sample/tree/master/kotlin-dsl) | Kotlin DSL bean definition example |
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<artifactId>wiremock-standalone</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
Expand Down
15 changes: 2 additions & 13 deletions client/src/main/java/com/example/demo/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,9 @@

@Configuration
public class ClientConfig {


@Bean
public ObjectMapper objectMapper() {
return new Jackson2ObjectMapperBuilder()
.featuresToEnable()
.featuresToDisable(
SerializationFeature.WRITE_DATES_AS_TIMESTAMPS,
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS,
DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS
)
.modulesToInstall(Jdk8Module.class, JavaTimeModule.class)
.build();
public PostClient postClient(WebClient webClient) {
return new PostClient(webClient);
}

@Bean
Expand Down
8 changes: 4 additions & 4 deletions client/src/test/java/com/example/demo/PostClientTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package com.example.demo;


import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.github.tomakehurst.wiremock.common.Json;
import com.github.tomakehurst.wiremock.http.Body;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
Expand All @@ -14,6 +10,10 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import reactor.test.StepVerifier;
import wiremock.com.fasterxml.jackson.databind.DeserializationFeature;
import wiremock.com.fasterxml.jackson.databind.ObjectMapper;
import wiremock.com.fasterxml.jackson.databind.SerializationFeature;
import wiremock.com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import java.time.LocalDateTime;
import java.util.List;
Expand Down

0 comments on commit 25c7631

Please sign in to comment.