NoSuchFlowExecutionException

Dan McLaughlin dmclaughlin at tech-consortium.com
Thu Oct 20 17:26:15 UTC 2022


I agree, but the logs sure seem to suggest that they are making that
assumption.  I guess that would suck if you had named all your destroy
methods "destroyMethod" and didn't want them to be called if you
didn't explicitly define it in your bean.   I could see that causing
someone a lot of headaches.

--

Thanks,

Dan

On Thu, Oct 20, 2022 at 12:05 PM Cantor, Scott <cantor.2 at osu.edu> wrote:
>
>
> >  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