Spring provides the powerful annotation @value to set a default value expression for a field or method/constructor parameter. @value is mainly used to inject a property value from the applications.properties file into a Spring bean. This tutorial...
Tagged: Properties
Rename Spring Boot application.properties configuration file
By default, Spring Boot will look for your externalized properties in a file named application.properties located in one of the following folders : classpath root in the package /config in classpath in the current...
Spring Boot multiple databases configuration
By simple configuration, Spring boot provides a powerful way to work with a single database. Sometimes you need to work with multiple databases (for example, one for basic usage and another for archiving). In...
Write properties file in Java
Properties file are often used in Java applications in the aim to store configuration parameters, internationalization and various informations. Each line of a properties file is a key/value entry. The key and the value...
Read properties file in Java
Properties file are often used in Java applications in the aim to store configuration parameters, internationalization and various informations. A properties file have « .properties » as extension where each line is a key/value...