This is run by a Spring Interceptor from ProceedingJoinPoint
fun myMethod(methodSignature : MethodSignature){
val params : Array<Parameter>? = methodSignature.method.parameters
if(params != null && params.isNotEmpty){
params.forEachIndexed{
index, parameter ->
for(annotation in parameter.annotations){
println(AopUtils.getTargetClass(annotation))
}
}
}
}
Currently, I am only seeing Proxy classes (eg com.sun.proxy.$Proxy123 and not MyAnnotation) in the println. How to get the actual annotation class? Yes, the annotation was written in Kotlin.