NoSuchFlowExecutionException
Cantor, Scott
cantor.2 at osu.edu
Thu Oct 20 17:05:51 UTC 2022
> But now I'm starting to wonder if we just named our destroy methods
> "destroyMethod" instead of "destroy" if Spring would automatically
> call that method even if we didn't explicitly define it in our bean
> declarations.
I doubt it, Spring can't just assume that. The only time it will automatically call methods is if you implement their custom interface for lifecycle management (i.e. classes have to be Spring-specific).
However, Spring 6 has either a bug or a feature causing it to loudly complain if It can't locate what it thinks is the proper destroy method, and they haven't answered me yet about whether that's deliberate.
That makes the defaulting of the methods in the beans element very difficult to use without a ton of init-method="" attributes all over the files. We don't control every class and we don't want to implement pointless methods even if we do.
-- Scott
More information about the dev
mailing list