OPI Blog
Learn from experts in their fields

Browsing Tags: spring

Sep 3, 2020
Using Spring Beans in a Kafka Streams ExceptionHandler
There are many things to know before diving into Kafka Streams. If you haven’t already, check out these 5 things as a starting point. Bullet 2 mentions designing for exceptions. Ironically, this seems to be ...
May 21, 2019
Speed Up Spock Spring Tests
This article follows up some excellent info on testing Spring with Spock here and here. Developing with Spring and testing with Spock means you’re using two of the best tools available on the JVM today. ...
Testing with Spring Kafka and MockSchemaRegistryClient
Spring Kafka provides a variety of testing utilities to make writing integration tests easier. Most notably, the @EmbeddedKafka annotation spins up an embedded broker (and zookeeper) available for tests. The address of the broker is set to ...
Aug 7, 2018
Apache Kafka and Reactive Spring Boot
This post is a continuation of the two part series exploring Apache Ignite, Apache Kafka, and Reactive Spring Boot concepts. This part covers the use of Reactive Kafka consumers to return live database events to ...
Jul 26, 2018
Streaming Apache Ignite changes in Apache Kafka Topics
This is a two part series exploring Apache Ignite, Apache Kafka, and Reactive Spring Boot concepts. This part covers the setting up of Apache Ignite as a datasource and using Apache Kafka as a streaming ...
Spock 1.2 Annotations for Spring Integration Testing
@SpringBean, @SpringSpy, and @UnwrapAopProxy are new annotations in Spock 1.2 that make it easier to inject mocks into the Spring context when doing Integration testing. These can greatly simplify your code from using a @TestConfiguration ...
RestTemplate Status Code Handling
I was writing a  Spring Boot microservice that called an external service. If the service returned a `500`, the payload of the response had an error code that we wanted to send back to the ...
Dec 20, 2017
Dynamic SFTP Connection Factory for Spring Integration
I recently had the opportunity to dive into a Spring Integration project that presented an interesting challenge: the creation of a outbound SFTP Connection Factory at runtime based on Spring Batch jobs. In a simple ...
Dec 14, 2017
Serializing Groovy Traits with Jackson
Working on a Groovy and Spring Boot project, we encountered a serialization issue on an object that implemented a Groovy trait. The object would be serialized correctly until the JsonFormat annotation was used on one ...
Spring Webflux – Functional Endpoints
I’m a big fan of Spring and was excited when Spring announced that Spring 5 had been released. I was curious about the new Functional Endpoints that were introduced in Spring 5 and wanted to ...