If I want to use Spring retry in Java I do this, w...
# spring
p
If I want to use Spring retry in Java I do this, with "@BackOff". If I paste the same annotation on a Kotlin function it complains about the @ sign with "an annotation can't be used as the annotations argument, so I have to remove the @ sign which is what also happens if I convert the Java to Kotlin Why is this and will the Kotlin work without the @ sign ? Kotlin:
Copy code
@Retryable(backoff = @Backoff(delay = 2222)) // won't compile
    fun doIt() {
    }
Java:
Copy code
public class Delme {

    @Retryable(backoff = @Backoff(delay = 2222))
    void doIt() {

    }
}
k
I don't know but I would ask that in other channel, this is not much related to spring
t
syntax is something like
Copy code
@Retryable(backoff = Backoff(delay = 2222))
or
Copy code
@Retryable(backoff = [Backoff(delay = 2222)])
I don’t remember exactly
k
this is from doc
Copy code
If an annotation is used as a parameter of another annotation, its name is not prefixed with the @ character:
p
ah, great, thanks