Affects: Spring Framework v6.0.0-M6

Seeing these since Spring Boot 3.0-M4, and @wilkinsona suggested I open an issue for those here.

2022-09-26 15:32:23.243  WARN [                                main]   o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'flags' attribute in @org.hibernate.validator.constraints.URL with an appropriate @AliasFor declaration -- for example, @AliasFor(annotation = jakarta.validation.constraints.Pattern.class).
2022-09-26 15:32:23.243  WARN [                                main]   o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'groups' attribute in @org.hibernate.validator.constraints.URL with an appropriate @AliasFor declaration -- for example, @AliasFor(annotation = jakarta.validation.constraints.Pattern.class).
2022-09-26 15:32:23.243  WARN [                                main]   o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'message' attribute in @org.hibernate.validator.constraints.URL with an appropriate @AliasFor declaration -- for example, @AliasFor(annotation = jakarta.validation.constraints.Pattern.class).
2022-09-26 15:32:23.243  WARN [                                main]   o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'payload' attribute in @org.hibernate.validator.constraints.URL with an appropriate @AliasFor declaration -- for example, @AliasFor(annotation = jakarta.validation.constraints.Pattern.class).
2022-09-26 15:32:23.243  WARN [                                main]   o.s.c.annotation.AnnotationTypeMapping : Support for convention-based annotation attribute overrides is deprecated and will be removed in Spring Framework 6.1. Please annotate the 'regexp' attribute in @org.hibernate.validator.constraints.URL with an appropriate @AliasFor declaration -- for example, @AliasFor(annotation = jakarta.validation.constraints.Pattern.class).

Only affects @URL amongst those I use, so there could be more or it could be a one-off. Not certain.

Comment From: sbrannen

Issuing a warning in scenarios that are completely unrelated to Spring was certainly unintentional, so thanks for raising the issue.

Generally speaking, any annotation meta-annotated with @jakarta.validation.Constraint (such as @org.hibernate.validator.constraints.URL) is participating in annotation semantics of the Java Bean Validation framework. So we could simply omit any custom validation constraint annotations from the warning, although there might be other use cases we should address.

We will investigate if we can improve this.

Related Issues:

  • 28760

Comment From: sbrannen

This has been addressed in main.

Only affects @URL amongst those I use, so there could be more or it could be a one-off. Not certain.

It applied to Bean Validation @Constraint annotations that were meta-annotated with other @Constraint annotations. Hibernate's @URL annotation is meta-annotated with @Pattern, and the former overrides attributes in the latter.

Comment From: Tristan971

Makes sense, thanks!