Join Slack
Powered by
why it can't be autowired?
# spring
k
kqr
01/09/2021, 12:13 AM
why it can't be autowired?
b
bjonnh
01/09/2021, 12:19 AM
oh I could use a @Qualifier maybe? that's one way I know how to do that
bjonnh
01/09/2021, 12:20 AM
sorry, I've used Spring a bit with Kotlin, but there is still a lot of magic
k
kqr
01/09/2021, 12:21 AM
maybe paste some code
kqr
01/09/2021, 12:22 AM
but if you have it as spring bean I don't see a reason why you have to get via appcontext
kqr
01/09/2021, 12:22 AM
are you accesing outside of spring beans?
b
bjonnh
01/09/2021, 12:23 AM
https://gitlab.com/lotus7/wikidataLotusImporter/-/blob/feature-spring-based-import[…]lin/net/nprod/lotus/importer/configurations/JobConfiguration.kt
bjonnh
01/09/2021, 12:23 AM
I managed to get it to work with qualifiers:
https://gitlab.com/lotus7/wikidataLotusImporter/-/blob/feature-spring-based-import[…]in/kotlin/net/nprod/lotus/importer/controllers/JobController.kt
bjonnh
01/09/2021, 12:25 AM
I was using appcontext because that's what I found in some people's code and I didn't find much info on running batch jobs
4
Views
Open in Slack
Previous
Next