Skip to content

Supply RuntimeHints to an AotContextLoader #34513

Closed
@snicoll

Description

@snicoll

I am looking at spring-projects/spring-boot#44461 and what my options are to register a reflection hints for the main method that SpringBootContextLoader invokes via reflection.

It is an AotContextLoader but I don't have a way to get the RuntimeHints to register the necessary hint. Looking at the current arrangement, I don't see something that we could implement that gives us the MergedContextConfiguration and RuntimeHints. The closest I found is MergedContextConfigurationRuntimeHints but it's private.

Have I missed something? https://github.com/spring-projects/spring-boot/blob/93648792b14301264c7fdbb4ea343b9092a0d7ed/spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootContextLoader.java#L128 is where I'd need some way to get the runtime hints.

Metadata

Metadata

Assignees

Labels

in: testIssues in the test moduletheme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions