It's ugly, but I've confirmed this works with both SpringBoot 2.7.18 and SpringBoot 3.4.5.
(and despite what you may read elsewhere, it does work on abstract classes, as long as the @Validated and the validation constraint are both on the abstract class)
import org.springframework.validation.annotation.Validated;
@Validated
public abstract class AbstractJwksAutoConfig {
@javax.validation.constraints.Min(60000L)
@jakarta.validation.constraints.Min(60000L)
@javax.validation.constraints.Max(86400000L)
@jakarta.validation.constraints.Max(86400000L)
Long jwksRefreshTimeInMillis = 180000L;
...
}