Shaaf's blog

A technical blog about Java, Kubernetes and things that matter

Angular TodoMVC with Spring boot backend, deploy to Kubernetes

TODO Demo App - Spring / Angular

This article guides you through building a Spring Boot demo application and deploying it on Kubernetes using the JBoss Web Server Operator. The application uses the TodoMVC Angular front-end, integrated with a Spring Boot backend. The Todo entity is defined with JPA annotations for database mapping. The TodoController handles CRUD operations, and TodoRepository extends JpaRepository for database interactions. The application can be run locally or packaged with Tomcat as an embedded server. The deployment process includes building a Docker image, pushing it to a repository, and deploying on OpenShift. Configuration details for both H2 and PostgreSQL databases are provided.


Java monitoring: Exploring Cryostat 2.4 features on OpenShift

Orignally posted at Red Hat Developers

Red Hat’s latest build of Cryostat 2.4, designed specifically for the Red Hat OpenShift Container Platform, brings a wealth of features and enhancements that cater to various monitoring needs for Java applications.

At its core, Cryostat 2.4 excels in comprehensive Java Flight Recorder (JFR) data management. Users can effortlessly start, stop, retrieve, archive, import, and export JFR data, all through an intuitive web console or an accessible HTTP API. This enhances the ease with which developers can handle JVM performance data. Moreover, Cryostat 2.4 provides flexibility in terms of data storage and analysis. Users can store and analyze JFR data directly on their Red Hat OpenShift or export it to external monitoring applications for a deeper dive into the data.


Whats New for developers in JDK 21

Orignally posted at Red Hat Developers

In an exciting development for Java developers, this September 19th marked the release of JDK 21. This release contains many new capabilities that benefit the Java ecosystem, including virtual threads, record patterns, and sequenced collections. There are also some interesting features in the preview for JDK 21, such as string templates, scoped values, and structured concurrency. This article highlights six new features in this release.


Keycloak Operator for Kubernetes - a Basic Tutorial

The Keycloak team announced that they were going to move to a new Operator framework that will effictevely manage Keycloak installatons on a Kubernetes cluster. So what is an Operator in the Kubernetes context. Simplyfying it a bit here… Its basically a component that takes over the operational aspects of your application. So rather then managing all of the lifecycle and state in scripts and in our minds in someways is coded into an operator. For us Keycloak Operator does exactly that and in this blog I will cover how to setup a very simple Keycloak installation and get ready for development. If you are interested in knowing more about Operators you will likely find some good info here.


error: --enable-preview must be used with either -source or --release

The JDK 21 release is well underway likely to drop around September 19th, and its not GA yet. further more it provides preview features.

It was time for downloading one of the releases and giving it a try. Well I have given it a try some weeks ago so I already had it installed. e.g.

openjdk version "21-ea" 2023-09-19
OpenJDK Runtime Environment (build 21-ea+26-2328)
OpenJDK 64-Bit Server VM (build 21-ea+26-2328, mixed mode, sharing)

The fun thing though is that there are couple of very cool features that are still in preview. e.g. I tried to use the StringTemplates mentioned in the InfoQ blog