Stop using convention-based annotation attribute overrides in tests

This commit replaces convention-based annotation attribute overrides in
tests with explicit use of @AliasFor -- except for tests in spring-core,
since we still want to test our support for convention-based annotation
attribute overrides.

See gh-28760
This commit is contained in:
Sam Brannen
2022-07-08 18:59:06 +02:00
parent 6812de7b82
commit 73d92d66b9
11 changed files with 51 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2021 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.AliasFor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import org.springframework.http.HttpEntity;
@@ -635,6 +636,7 @@ public class MvcUriComponentsBuilderTests {
@Documented
private @interface PostJson {
@AliasFor(annotation = RequestMapping.class)
String[] path() default {};
}