Posts about Java
Spring AI: Getting Started
How to get started with Spring AI and easily integrate Artificial Intelligence functionality into your Spring Boot application.
Java Pattern Matching: InstanceOf (JEP 305)
This new feature in Java 14 allows you to simplify your code and get rid of a lot of boilerplate when using instanceof.
Java Records (JEP 359)
Records are new type in Java 14, which allow you to declare simple data classes without all the boilerplate.
JavaFX Tutorial: CSS Styling
JavaFX Tutorial · Part 6/7How to style JavaFX components using good old CSS.
JavaFX Tutorial: Advanced layouts
JavaFX Tutorial · Part 5/7How to organize and position your GUI components in JavaFX application using advanced layouts.
JavaFX Tutorial: Basic layouts
JavaFX Tutorial · Part 4/7How to organize and layout your GUI components in JavaFX application.
JavaFX Tutorial: FXML and SceneBuilder
JavaFX Tutorial · Part 3/7How to build GUI with JavaFX using FXML markup and SceneBuilder.
JavaFX Tutorial: Hello world
JavaFX Tutorial · Part 2/7Tutorial on how to build your first JavaFX application.
JavaFX Tutorial: Getting started
JavaFX Tutorial · Part 1/7How to setup and start working with JavaFX using Maven, Gradle or JavaFX SDK.
How to deploy war files to Spring Boot Embedded Tomcat
How to deploy external WAR files to your Spring Boot Embedded Tomcat.
Deploying Spring Boot app as WAR
How to change your JAR Spring Boot app to be packaged and deployed as WAR without sacrificing direct execution capabilities of embedded app server.
History of Java interface feature changes
Java interface changed a lot through the years. What were the changes during its evolution?
Java Text Blocks
Java 13 finally brings support for multi-line string literals after dropping similar functionality from Java 12.
Try with resources in Java
Try with resources offers an easy and foolproof way to make sure all your resources are properly closed. It manages closing automatically instead of explicitly using "try-finally".
Java By Comparison Book Review
This book aims to teach you how to write cleaner, more elegant code in Java. It covers 70 issues of various topics with before and after comparison in a concise, easy to read and understand way.
Java 13 Enhanced Switch
Java 12 introduced a whole lot of useful improvements to the good old switch, which makes it way more useful.
Java Raw String Literals
Java finally brings support for raw strings. They can span multiple lines and you don't need to escape special characters. Especially useful for regular expressions.
Spring Boot Admin Tutorial
Monitor and manage your Spring Boot apps with a nice UI on top of Spring Boot Actuator endpoints.
Faster Development with Spring Boot DevTools
How to speed up your Spring Boot development even more with DevTools and make it more enjoyable and productive?
Actuator: Spring Boot Production Monitoring and Management
Monitor and manage your application in production with Spring Boot Actuator 2.x. Gather metrics or check health easily.
Detecting build version and time at runtime in Spring Boot
How to obtain artifact version, build time and other build information in a Spring Boot app at runtime?
Spring REST Docs - Test driven documentation of REST API
Test driven REST API documentation as an alternative to traditional Swagger docs.
JShell - New REPL tool in Java 9 for quick prototyping
From version 9, Java now has its own interactive REPL console, which is useful for quick checks, prototyping and educational purposes.
Getting rid of web.xml in Spring MVC App
From Servlet 3.0 on, web.xml is optional. How to get rid of it in your Spring MVC app and what is the replacement?
Documenting Spring Boot REST API with Swagger and SpringFox
How to document your Spring Boot REST APIs using Swagger with SpringFox?
Java 10 – var – Local Variable Type Inference (JEP-286)
In Java 10, you no longer need to explicitly declare a type of local variables, which significantly reduces boilerplate and increases readability.
Vaadin 8 Certification
If you are considering taking Vaadin 8 certification, this review can come in handy.
Bit Manipulation in Java – Bitwise and Bit Shift operations
Java enables you to manipulate integers on a bit level, that means operating on specific bits, which represent an integer number. In some cases, it can be really handy.
Java Cloning Problems
Java's mechanism for copying objects is deeply flawed. What are the alternatives? What are the pitfalls if you decide to use Java cloning anyway?
Java 9: Compact Strings
Java 9 brings a new, improved string, which in most cases, will greatly reduce String memory consumption.
Java 9: Enhanced deprecation
@Deprecated annotation, introduced in Java 5, received several enhancements in Java 9, which makes easier to document deprecated API.
Detecting dependencies with known vulnerabilities
How to automatically detect vulnerable third-party libraries as a part of your build process, integrate it with CI and track vulnerable dependencies over time?
PostgreSQL’s JSONB type mapping using Hibernate
PostgreSQL 9.4 added support for JSONB data type. Hibernate, however, currently does not support out of the box mapping for it. This post describes how to implement custom mapping for JSONB in Spring Boot application.
Avoid Utility Classes
Utility classes, while popular, have some serious implications and you should think twice before using them.
Exam Notes – Pivotal Certified Spring Professional
Study materials and an exam review for Pivotal Certified Spring Professional Exam 4.2, with flashcards and study notes.
Singleton Pattern Pitfalls
Singleton, one of the most popular design patterns has a lot of serious drawbacks and some even consider it an anti-pattern. What are the pitfalls of the famous pattern?
Exam Notes: Pivotal Certified Spring Web Application Developer
Study materials and an exam review for Pivotal Certified Spring Web Application Developer Exam 4.2, with flash-cards and study notes.
Field Dependency Injection Considered Harmful
Field injection is a very popular practice in Dependency Injection frameworks, such as Spring. It has, however, several serious trade-offs and should generally be avoided.
Telescoping Constructor Pattern alternatives
Telescoping constructor pattern is quite common practice. It has, however, some shortcomings. What are the alternative approaches and when should you use them?
Stop using Javadoc @author tag
Are you still using @author Javadoc tag? Maybe it's time to reconsider. Let's discuss why the tag may be actually harmful and why you should stop using it.
Should I explicitly declare serialVersionUID?
Should you explicitly declare serialVersionUID or leave it to be automatically generated?
Break the Java Generics Naming Convention?
Descriptive names improve readability and reduce confusion. Yet official Java conventions restrict generic type names to a single letter — should you stick to it?









































