Microservices – Looking up a service using Eureka

This is the first in a series of posts/tutorials on developing Microservices in Java. This first one kicks off with looking up micro services with Eureka. Based on this tutorial: https://spring.io/blog/2015/07/14/microservices-with-spring Code found here: https://github.com/paulc4/microservices-demo important about logs logs config is in ( log config in the yaml config files will be ignored ! ): … Read more

Maven cheatsheet

Just a place for me to store handy bits and pieces. Having not used it for awhile to remind of things, I’ll likely to forget ! How to compile to different versions of Java ( see also https://mkyong.com/maven/maven-error-invalid-target-release-1-11/ )

In the <build> section How to change the output/target dir Handy if you want to … Read more

Running Docker on AWS

Recently I wanted to use my Java Tomcat Docker image on AWS to run a spring boot app. I looked at the various ways of setting this up ECS (Elastic Container), and found it to be a load of hassle ( for what I needed , I don’t need Kubernetes style functionality , just a … Read more

Threads in Java

We need to control access to shared state ( when multiple threads are at work ), to avoid unexpected results. In the case of the program below the shared state is the int sheepCount. 10 different threads call the method incrementAndReport() . Without thread management 

Output ( wonky ) Every thread is trying to … Read more