spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

Introduce dedicated contract for contributing runtime hints for a bean

Open snicoll opened this issue 2 months ago • 0 comments

As discussed in https://github.com/spring-projects/spring-framework/issues/35500#issuecomment-3334284774 there is a desire to create a dedicated hook point for contributing runtime hints (and runtime hints only) for a bean.

Right now we use BeanRegistrationAotProcessor for the lack of a better option but the callback provides the whole code generation machinery that such implementations do not need. Having a dedicated callback should achieve the following:

  • Ease unit testing as we only need to provide RuntimeHints
  • Clarify the scope so that we can not invoke such implementations at all if runtime hints aren't required.

snicoll avatar Sep 26 '25 08:09 snicoll