visakha
04/19/2018, 12:59 PM@Component
@ConfigurationProperties()
class PropHldr {
companion object {
@Value("\${sipPropFiles}")
lateinit var sipPropFile: String
}
}
tginiotis
04/19/2018, 1:08 PMAutowireCapableBeanFactory
from somewhere, e.g. by dependency injection or during SpringApplication
setup and call beanFactoryInstance.autowireBean(PropHldr.Companion)
visakha
04/19/2018, 1:23 PM@Value("\${sipPropFile}")
read from the application.properties file..... the below is also not working @Configuration()
class Routing {
@Value("\${sip.sipPropFile}")
lateinit var sipPropFile: String
Czar
04/19/2018, 1:27 PMvisakha
04/19/2018, 1:29 PMtginiotis
04/19/2018, 1:32 PMUsing the @Value annotation
headingvisakha
04/19/2018, 1:55 PM@PropertySource("classpath:application.properties")
did the trick 🙂visakha
04/19/2018, 1:58 PMvisakha
04/19/2018, 2:00 PM@Configuration
annotation -- btw I was running the JUnit5 test case, this is where it originatedtginiotis
04/19/2018, 2:01 PM