Kotlin + Spring AliasFor

我一直在尝试在Kotlin项目中使用Springs @AliasFor注解,但注解参数上的注释看起来在运行时是不可见的(因此Spring没有采用它)。

例如:

 @RequestMapping(method = arrayOf(RequestMethod.POST)) annotation class PostMapping( @get:AliasFor(annotation = RequestMapping::class, attribute = "value") vararg val value: String = arrayOf()) 

和…

 // Returns empty array instead of array with the @AliasFor annotation PostMapping::class.java.methods[0].annotations 

有什么我失踪?

这是Kotlin中的一个bug,目前尚不明确 : KT-11475 。