Monitoring Java Applications with Flight Recorder 1. Overview In this tutorial, we’ll examine Java Flight Recorder, its concepts, its basic commands, and how to use it. 2. Java Monitoring Utilities Java is not just a programming language but a very rich ecosystem with a lot of tools. The JDK contains… Continue Reading java-flight-recorder-monitoring

How to Fix java.lang.UnsupportedClassVersionError 1. Introduction In this short tutorial, we’re going to learn what causes the Java runtime error java.lang.UnsupportedClassVersionError: Unsupported major.minor version and how to fix it. 2. A Look at the Error Let’s start by looking at an example error: Exception in thread “main” java.lang.UnsupportedClassVersionError: com/baeldung/MajorMinorApp has been… Continue Reading java-lang-unsupportedclassversion

Permissions-Based Access Control with Apache Shiro 1. Introduction In this tutorial, we’ll look at how to implement fine-grained Permissions-Based Access Control with the Apache Shiro Java security framework. 2. Setup We’ll use the same setup as our introduction to Shiro — that is, we’ll only add the shiro-core module to… Continue Reading apache-shiro-access-control

Spring Security Expressions – hasRole Example 1. Overview Spring Security provides a large variety of Expressions, using the powerful Spring Expression Language (SpEL). Most of these security expressions are evaluated against a contextual object – the currently authenticated principal. The evaluation of these expressions is performed by the SecurityExpressionRoot –… Continue Reading spring-security-expressions-basic

Common Java Exceptions 1. Introduction This tutorial focuses on some common Java exceptions. We’ll start by discussing what an exception basically is. Later, we’ll discuss different types of checked and unchecked exceptions in detail. 2. Exceptions An exception is an abnormal condition that occurs in a code sequence during the… Continue Reading java-common-exceptions

Simple Single Sign-On with Spring Security OAuth2 1. Overview In this tutorial, we’ll discuss how to implement SSO – Single Sign On – using Spring Security OAuth and Spring Boot. We’ll use three separate applications: An Authorization Server – which is the central authentication mechanism Two Client Applications: the applications… Continue Reading sso-spring-security-oauth2