Exception thrown when using @Service in Kotlin

前端 未结 1 1457
广开言路
广开言路 2021-01-11 23:21

I\'m writing an SSM project in Kotlin and this happens as long as I try to annotate a class (a service implementation) with @Service.

  1. Trie
1条回答
  •  半阙折子戏
    2021-01-11 23:45

    Kotlin's reflection facilities needed by Spring are shipped in a separate JAR. Try adding it into your build:

    build.gradle:

    compile 'org.jetbrains.kotlin:kotlin-reflect:1.1.51'
    

    pom.xml:

    
        org.jetbrains.kotlin
        kotlin-reflect
        1.1.51
    
    

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