Hi folks, I could really use some help. I’m tryin...
# getting-started
d
Hi folks, I could really use some help. I’m trying to take a template Kotlin / Spring Boot application and get it running with some real data. In order to do so, I need some way to wire in a path to a directory. I don’t care if it is a command line argument or a property read by Spring, but I can’t find a way to get either to work properly. 😕 right now, I’m trying the prop method, so I have
@Configuration @ConfigurationProperties class AppProps { @NotNull lateinit var sourceRoot: String}
and later on, inside a component class:
@Component class Platform(..., appProps: AppProps) { init { val sourceRoot = appProps.sourceRoot } }
but when I try to print that val, it is empty.
k
#spring