Quantcast
Channel: zeroturnaround.com » All Posts
Viewing all articles
Browse latest Browse all 2540

Reply To: renaming a spring bean class leads to 2 beans in the application context

$
0
0

Well renaming a bean most of the time is the same as renaming the class if there was no explicit bean name set. Choosing a different name for a class happens regularly during initial code development when concepts are still settling. The side effect in this particular case was that one of our application management screens was showing a duplicate entry in a dropdown where we list all beans implementing a specific interface. Nothing terrible really. But for example imagine one would rename a class implementing <ApplicationListener>, then business logic in that handler would execute twice because of there being two such beans now, probably causing quite a bit of confusion.

Jorg


Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>