In our efforts to get rid of bean overriding in the core framework, I've noticed that ScriptFactoryPostProcessor#prepareScriptBeans is invoked twice, that is:

  • From postProcessBeforeInstantiation which looks the regular call
  • And predictBeanType which looks a pre-init step to provide the right outcome

Ideally, this would only run once. Checking for the presence of scriptFactoryBeanName should be enough.

Comment From: snicoll

I don't know what happened with this one but I can't reproduce what I've described above.