Error to inject some dependency with kotlin + quarkus

前端 未结 1 865
暗喜
暗喜 2021-01-18 04:39

I want to include a dependency in my Kotlin Resource file. But I cant.

I made this tutorial: https://quarkus.io/guides/rest-client-guide But, to start the project, I

1条回答
  •  太阳男子
    2021-01-18 05:01

    This problem results as a combination of how Kotlin handles annotations and the lack of the a @Target on the @RestClient annotation definition.

    To fix your problem, simply use:

       @Inject
       @field: RestClient
       lateinit internal var countriesService: CountriesService
    

    0 讨论(0)
提交回复
热议问题