property-placeholder

Spring boot integration test with SpringApplicationConfiguration doesn't seem to resolve @Value annotation

I have an integration test set up like: @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = {XmlFileSplitter.class, ...}) public class XmlFileSplitterTests { .. In the XmlFileSplitter I have a property that is annotated with @Value("${default.output.file}") and its

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.priceFactor}") private Double priceFactor = 0.1; // ... and using Spring property placeholder (Properties files): item.priceFactor=0.1 I get Exception: org.springframework.beans

How to resolve placeholder in properties file with values from another properties file in spring boot application

My spring boot application has below properties files. src/main/resources/config/DEV/env.properties mail.server=dev.mail.domain src/main/resources/config/QA/env.properties mail.server=qa.mail.domain src/main/resources/config/common/env.properties mail.url=${mail.server}/endpoint Is it possible to