BAEL-3497 IntelliJ Cannot Resolve Spring Boot Configuration Properties (#8775)

Co-authored-by: Oskar <>
This commit is contained in:
Roman
2020-03-11 19:43:43 +01:00
committed by GitHub
parent 356ef842f0
commit 8be4255cbb
6 changed files with 104 additions and 0 deletions
@@ -0,0 +1,24 @@
package com.baeldung.configuration.processor;
import org.junit.jupiter.api.*;
import org.junit.runner.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.boot.test.context.*;
import org.springframework.test.context.*;
import org.springframework.test.context.junit4.*;
@RunWith(SpringRunner.class)
@TestPropertySource("/configuration-processor.properties")
@SpringBootTest(classes = DemoApplication.class)
class PropertyBeanInjectionUnitTest {
@Autowired
private PropertyBeanInjection propertyBeanInjection;
@Test
void checkThatCustomPropertiesHaveTheCorrectValueFromPropertiesFile() {
Assertions.assertEquals("www.abc.test.com", propertyBeanInjection.getUrl());
Assertions.assertEquals(2000, propertyBeanInjection.getTimeoutInMilliseconds());
}
}