Revise support for JSR-330 and Jakarta @Inject for autowiring test constructors

Closes gh-29851
This commit is contained in:
Sam Brannen
2023-09-08 19:25:31 +02:00
parent 8dd857a84d
commit dfea3d05aa
8 changed files with 117 additions and 191 deletions

View File

@@ -170,8 +170,9 @@ of a test class constructor are autowired from components in the test's
If `@TestConstructor` is not present or meta-present on a test class, the default _test
constructor autowire mode_ will be used. See the tip below for details on how to change
the default mode. Note, however, that a local declaration of `@Autowired` on a
constructor takes precedence over both `@TestConstructor` and the default mode.
the default mode. Note, however, that a local declaration of `@Autowired`,
`@jakarta.inject.Inject`, or `@javax.inject.Inject` on a constructor takes precedence
over both `@TestConstructor` and the default mode.
.Changing the default test constructor autowire mode
[TIP]