1
我一直在尝试使用温泉@AliasFor
标注在科特林项目,但它似乎在注释参数标注在运行时不可见的(因此它没有拾起春季)。科特林+春AliasFor
例如:
@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
有我丢失的东西?
与此同时,您可以使用Java编写这一个类。 –
感谢您的信息! – Arthur