Top "Spring-properties" questions

Reading a List from properties file and load with spring annotation @Value

I want to have a list of values in a .properties file, ie: my.list.of.strings=ABC,CDE,EFG …

java spring spring-properties
Spring @Value is not resolving to value from property file

I've had this working in some other project before, I am just re-doing the same thing but for some reason …

java spring spring-properties
Spring Boot access static resources missing scr/main/resources

I am working on a Spring Boot application. I need to parse an XML file (countries.xml) on start. The …

java spring spring-boot resources spring-properties
Spring @Value TypeMismatchException:Failed to convert value of type 'java.lang.String' to required type 'java.lang.Double'

I want to use the @Value annotation to inject a Double property such as: @Service public class MyService { @Value("${item.…

java spring spring-el spring-properties property-placeholder
Spring Boot bind @Value to Enum case insensitive

Enum public enum Property { A, AB, ABC; } Field @Value("${custom.property}") protected Property property; application.properties (lower case) custom.property=…

java spring spring-boot enums spring-properties
Specifying relative path in application.properties in Spring

Is there a way we can lookup file resources using relative path in application.properties file in Spring boot application …

spring spring-boot spring-properties
Spring @Value escape colon(:) in default value

I have the following property annotated with @Value. I have a default value defined using the default separator of ':" @…

spring spring-annotations spring-properties
spring application.yml reference list from another property

I have property file application-dev.yml with content: spring.profiles: dev config.some.value: - ELEMENT1 - ELEMENT2 and another …

spring spring-properties
Spring @Value("${}") often null

I'm using Spring Boot application. In some @Component class @Value fields are loaded, instead on other classes they are always …

java spring spring-boot spring-bean spring-properties
spring.profiles.active not honoured

In application.properties we have the line spring.profiles.active=LOCALHOST In application-DEV.properties , we have the line spring.profiles.…

java spring spring-boot spring-profiles spring-properties