We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug In ktor when i want to inject a class inside my Route I'm getting exception:
Exception in thread "main" java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt at org.koin.ktor.ext.RouteExtKt.getKoin(RouteExt.kt:74)
Here is my code: ` fun Route.authRoutes() {
val authService: AuthService by inject() route("/auth") { loginRoute(authService) }
} `
but when I change code to
` fun Route.authRoutes() {
val authService: AuthService by application.inject() route("/auth") { loginRoute(authService) }
} ` It works fine
Koin version: 4.0.0 Ktor version: 3.0.0-rc-1 kotlin version: 2.0.20
The text was updated successfully, but these errors were encountered:
As a workaround you can build or use the package from this PR : #1978 Tested on my project after a rebase on 4.0.0 and it works without problems.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
In ktor when i want to inject a class inside my Route I'm getting exception:
Exception in thread "main" java.lang.NoClassDefFoundError: io/ktor/server/routing/RoutingKt
at org.koin.ktor.ext.RouteExtKt.getKoin(RouteExt.kt:74)
Here is my code:
`
fun Route.authRoutes() {
}
`
but when I change code to
`
fun Route.authRoutes() {
}
`
It works fine
Koin version: 4.0.0
Ktor version: 3.0.0-rc-1
kotlin version: 2.0.20
The text was updated successfully, but these errors were encountered: