Top "Properties-file" questions

A .properties file is either a simple text file or an XML file containing pairs of keys and values.

Immutable @ConfigurationProperties

Is it possible to have immutable (final) fields with Spring Boot's @ConfigurationProperties annotation? Example below @ConfigurationProperties(prefix = "example") public final …

java spring spring-boot properties-file
Constants and properties in java

Java best practices recommends read properties as constants. So, what do you think is the best approach to reach it? …

java configuration constants config properties-file
Spring @Value annotated method, use default value when properties not available

Situation I am injecting properties from .properties file into fields annotated with @Value. However this properties present sensitive credentials, so …

java spring spring-boot spring-annotations properties-file
Spring boot external properties file in "current directory" is ignored

from the manual: 24.3 Application property files SpringApplication will load properties from application.properties files in the following locations and add …

java tomcat spring-boot properties-file externalizing
Write/Update properties file value in spring

I have some requirement where I want to write/update the value in the properties file I am using the …

java spring properties-file
load config file (project.properties) at runtime via command prompt in java

I would like to load properties file via command prompt in java. Properties file name: project.properties java -classpath .;test.…

java cmd properties-file
How to store and read SQL queries from properties or yml file in spring boot jdbc repository?

I am using spring boot and spring jdbc template. I want to externalize the SQL queries in either properties or …

java sql spring jdbc properties-file
Dynamic @Value-equivalent in Spring?

I have a Spring-managed bean that loads properties using a property-placeholder in its associated context.xml: <context:property-placeholder location="…

java spring properties-file
Spring boot - cannot set default Locale

I am now developing Spring Boot application (only rest controllers). Each request to my server contains language tag. I would …

java spring-boot locale properties-file
How would I specify a Hibernate "@Pattern" annotation using a regular expression from a .properties file or database

Situation: I would like to perform Hibernate Validation based upon user properties (to allow different validation rules for input based …

java regex hibernate-validator properties-file