Spring boot 2 with Junit 5 and Mockito 2 for unit testing and integration test

Here we will explain to use Junit 5 and Mockito 2 with Spring boot 2 when it comes to unit testing and integration tests .

mockito-junit5-logo3-horiz.png

Continue reading

Advertisements

Spring boot with embedded PostgreSQL for DAO integration/unit testing and local development

Here we will go through how to use embedded PostgreSQL in you local development environment plus how to use it for DAO integration/unit testing if you have are using PostgreSQL as your production database , you DAO testing should use the same database as your production one to have behavior consistency and same environment precondition.

Continue reading

Spring Boot Akka Event Sourcing Starter – Part 4 – Final

Now here we will share some possible designs when you use the spring boot event sourcing toolkit starter plus some remarks and action points .

What are some possible designs using the toolkit for event sourcing and CQRS services :

Continue reading

Spring Boot Akka Event Sourcing Starter – Part 1

Here I am going to share a custom toolkit wrapped as a spring boot with AKKA persistence starter to act as a read made toolkit for event driven asynchronous non blocking flow API ,  event sourcing and CQRS implementation within spring boot services which can be part of spring cloud micro-services infrastructure . Continue reading

Spring boot with Ehcache 3 and JSR-107

Here we are going to cover how to use Ehcache 3 as a Spring caching  in Spring boot based into JSR-107, before we start we need to just highlight what us JSR-107 :

JSR-107(JCache) Annotations:

In regards to caching, Spring offers support for two sets of annotations that can be used to implement caching. You have the original Spring annotations and the new JSR-107 annotations, for more information you can check :

https://spring.io/blog/2014/04/14/cache-abstraction-jcache-jsr-107-annotations-support

Continue reading

Spring boot with embedded config server via spring cloud config

When it comes to micro-services, it is really normal to have a configuration server that all your services will connect to fetch its own configuration but what about if you just need to externalize your configuration and make it manageable via source control like Git and your infrastructure is not yet ready for micro-services deployment and operation model.

manage-distributed-configuration-and-secrets-with-spring-cloud-and-vault-spring-io-2017-10-638

What if you have spring boot app and you want to use spring cloud config semantic to do the same for you , is it possible to start embedded spring cloud config inside the your spring boot app to fetch its configuration remotely from Git for example ? the answer is yes and i am going to show how :

configServerBoot

Continue reading