You correctly moved the configuration of each sender into the senders themselves. You also correctly added a interface and modified the senders to implement this rather than disparate calls.
The one thing that could have been done better is in the 'Alert' package, where you have a AlertHandler which would need to be modified if another sender is introduced. Ideally you want to end up with a system where you can simply code a new type of sender and add it to the bean configuration.
I see exactly what you mean. I made it more complicated than it needed to be, your solution was much simpler. I'll have to see if I can find some 'refactoring challenges' online, because this seems like a good way improve my coding/critical thinking skills. Thanks for taking the time to look it over and giving your feedback.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.