Guys, if we are using an annotation that need to r...
# announcements
g
Guys, if we are using an annotation that need to receive a string parameter, how could we assign the value on a way to work with kotlin? For example
Copy code
@Bean("MyBean") // works, but
@Bean(MyBean::class.simplaname) // don't work, since the annotation says something like `An annotation argument must be a compile-time constant`
Is there a way to contour this? Since the annotation will be compile-time constant to me. I would like do something like these to create a lot of dynamic values when using annotation classes.
k
Unfortunately this doesn't work yet, it's not allowed in Java either. There's an open issue on youtrack about this.
g
Thanks @karelpeeters 😃