Originally Posted by
zzkhan
I think viewnames for controllers (e.g. formView, successView and so on) come under configuration as well and for goods reasons, for instance if you need to reuse the logic in a given controller for presenting different views and the fact that you dont want to hardcode the flow of the application in your code.
Specifying viewnames in spring config was done by convention before the introduction of Annotated controllers in 3.0 because the good old Abstract Controller classes sort of 'advised' us to do so along with some other stuff. However after the advent of Annotated controllers, a lot of the 'guiding principles' (some viewed these as constraints) are gone with the abstract controllers getting deprecated in 3.0.
For people who despise XML configuration annotations is seen as the way to go to get to this utopia zero XML config controller configuration, and in getting to this the tendency is to hardcode things like viewnames in the controllers just to get away with not having it in configuration which I think is wrong as you are taking away the flexibility of your application just to save a handful of XML config.
Any thoughts?