79778559

Date: 2025-09-29 22:03:52
Score: 1.5
Natty:
Report link

For what it's worth, I’m answering myself: I ended up replacing my `@Component`s with explicitly declared beans in the configuration.

To enforce bean instantiation order, I injected a reference to the resolver bean into the constructor signatures of the beans I wanted to constrain — even if that reference isn’t used. In the code, I named that parameter`unused` to keep Sonar happy.

Incidentally, when the context fails to start (for instance if an invalid configuration cascades its state into the resolver instantiation), none of those beans could now be instantiable.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: FreeBSDEnthousiast