mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
b0ee513db6
For certain use cases it is beneficial to be able to compute something during AOT build-time processing and then retrieve the result of that computation during AOT run-time execution, without having to deal with code generation on your own. To support such use cases, this commit introduces an AotTestAttributes mechanism in the Spring TestContext Framework with the following feature set. - conceptually similar to org.springframework.core.AttributeAccessor in the sense that attributes are generic metadata - allows an AOT-aware test component to contribute a key-value pair during the AOT build-time processing phase, where the key is a String and the value is a String - provides convenience methods for storing and retrieving attributes as boolean values - generates the necessary source code during the AOT build-time processing phase in the TestContext framework to create a persistent map of the attributes - provides a mechanism for accessing the stored attributes during AOT run-time execution Closes gh-29100