Wednesday, February 20, 2019

Embedding dependencies when testing in Spring Boot

Full Stack Software Development Blog

I am working on a proof of concept (POC) for embedding dependencies in a Spring Boot server.

The following is from the top of the readme in my github repository for the POC.


A Spring Boot project that connects to various resources (database, mongo, rest calls, JMS messaging, Rabbit messaging, legacy). Mock the connections for acceptance testing.

The flow is...
  1. Receive a Todo message
  2. Make a REST call (for no good reason)
  3. Persist the Todo in a relational database
The server is setup to
  1. Listen to the mailbox queue of an external JMS ActiveMQ server
  2. Makes a REST call to http://worldclockapi.com/api/json/utc/now
  3. Inserts into a Postgres database
When running tests the server uses
  1. An embedded ActiveMQ server
  2. Wiremock to mock the REST calls
  3. An embedded H2 in memory database
If this interests you then check out the entire readme in my github repository at 

No comments:

Post a Comment