This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.0.26! |
Standard Annotation Support
The following annotations are supported with standard semantics for all configurations of the Spring TestContext Framework. Note that these annotations are not specific to tests and can be used anywhere in the Spring Framework.
-
@Autowired
-
@Qualifier
-
@Value
-
@Resource
(jakarta.annotation) if JSR-250 is present -
@ManagedBean
(jakarta.annotation) if JSR-250 is present -
@Inject
(jakarta.inject) if JSR-330 is present -
@Named
(jakarta.inject) if JSR-330 is present -
@PersistenceContext
(jakarta.persistence) if JPA is present -
@PersistenceUnit
(jakarta.persistence) if JPA is present -
@Transactional
(org.springframework.transaction.annotation) with limited attribute support
JSR-250 Lifecycle Annotations
In the Spring TestContext Framework, you can use If a method within a test class is annotated with |