When it comes to generating a random number in Java, we have several options. However I doubt none are as intriguing or as random as what you’ll learn about in this post. If your interested in how to generate a truly random number in Java by using the earth’s atmospheric noise as it source, then read on … Continue reading “Generating a Random Number in Java From Atmospheric Noise”
JDK 12 has introduced some much needed change to the switch statement. Our good old switch statement is being re-vamped and can now also be used as an expression. Learn how its new design eliminates common irritants, packs succinct syntax and provides exhaustive case coverage … Continue reading “JDK 12 Switch Expression – Preview Feature”
If your serious about building your Java applications with Spring Boot then your definitely going to love developing with Spring Tool Suite 4. In this post, I go over how to run the STS4 IDE from a Docker Container as well as introduce you to its new and amazing features that you won’t be able to live without.
Does the Java Optional Class finally rid us of NullPointerExceptions? I’ll demonstrate how when Optional is used correctly and when combined with Java’s functional style of programming, that this is indeed possible.
Before Java 9 we were all victims of having implementation details leaking out onto the Classpath, thus making them accessible to everyone. Java’s public access modifier is just too … well public! Lets take a look at how Java 9 Modules give us a substantial boost in providing strong encapsulation …
If your new to Dependency Injection and wondering what it is and why so many use it in their projects, then it might help to start from the beginning with a brief history of Dependency Injection. It all started with the new keyword a long long time ago …
Continue reading “A Brief History of Dependency Injection”
Are you searching for an alternative to Jenkins for your Java project? I sure was. I wasn’t all that interested in spending time and effort installing and configuring a local Jenkins server or even dishing out money to host one online, to start experimenting. What I found was an alternative which solved all those issues and got me quickly focusing on what I do best, code!
The much anticipated release of JUnit 5 is almost here and Spring 5.0 will have official support for it. However, it’s still possible to run JUnit 5 Tests within your current Spring applications right now. I’ll show you how to bring you testing to the next level by using Spring Boot and JUnit 5. This Post concentrates on the new ability to Dependency Inject right into our @Test method parameters. I warn you though, after getting a taste of this … there’s no going back!
You can achieve some amazing results with Spring Boot Test for your Integration Testing. I’ll be covering how to execute different groups (sub-sets) of Integration Tests which cover different layers (or slices) of your application. Applying this layered approach will give you increased flexibility and the opportunity to identity problem areas earlier on.
There are lots of Dockerfile tips and best practices out there but the problem is, who can remember them all ! In the end, all that matters is building a Docker Image as fast as possible and keeping it lean and mean. I’m going to cover 1 easy to remember Dockerfile tip that will serve you well going forward.