How to get the Tomcat home directory in Java
Is there a function in Java to retrieve the Tomcat (Catalina) home directory? Yes, Tomcat home directory or Catalina directory is stored at the Java System Property environment. If the…
Favourite tutorials for developers
Is there a function in Java to retrieve the Tomcat (Catalina) home directory? Yes, Tomcat home directory or Catalina directory is stored at the Java System Property environment. If the…
A simple log4j2.properties example, just for self-reference
In Spring Boot, it picks .properties or .yaml files in the following sequences : application-{profile}.properties and YAML variants, application.properties and YAML variants. Tested :Spring Boot 2.1.2.RELEASE, Maven 3. This article…
Spring Boot @ConfigurationProperties is letting developer maps the entire .properties and yml file into an object easily. Normally, we use the @Value to inject the .properties value one by one,…
In this tutorial, we will show you how to use Logback in Spring Boot framework. Technologies used : Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Logback 1.2.3, Maven 3, Java 8
In non static method, we use getClass() of the object or instance. In static method, the getClass() method will be failed, and prompts Cannot make a static reference to the…
Normally, Java properties file is used to store project configuration data or settings. In this tutorial, we will show you how to read and write to/from a .properties file. The…
In Java, you can use System.getProperties() to get all the system properties. Also by sorting, you can display all the system properties in Alphabetical order.