Issues with Kotlin and Beans
jonasbark opened this issue · 0 comments
jonasbark commented
Sorry for the lack of a better title but I found very weird behavior when trying to include the embedded-keycloak-server dependency in a Kotlin Spring Boot project.
I created a very barebone project where it's reproducible:
https://github.com/jonasbark/embedded-keycloak-server-kotlin-issue
The issue:
Parameter 0 of constructor in pass.PassAuthenticationApplication required a bean of type 'pass.test.KotlinBean' that could not be found.
When removing the dependency from line 36 in build.gradle.kts it starts up just fine so I'm super confused as to why.
Observations:
- if the KotlinBean is written in Java it works without issue (hence including Kotlin in the issue title)
- happens with maven projects as well. The issue actually popped up after I tried upgrading to 3.0.1 from 2.0.* and suddenly the beans weren't available anymore
Let me know if I can provide more information!