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 2002-2020 the original author or authors.
* Copyright 2002-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.
@@ -29,6 +29,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.core.annotation.AliasFor;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.transaction.TransactionManager;
@@ -668,6 +669,7 @@ public class AnnotationTransactionAttributeSourceTests {
@Transactional(rollbackFor = Exception.class, noRollbackFor = IOException.class)
@interface TxWithAttribute {
@AliasFor(annotation = Transactional.class)
boolean readOnly();
}