<p>I am building an application using Spring MVC. I want to make certain changes to my Model for every Controller in the application. In particular, I want to insert certain extra data into the model which will be present for all pages of the application.</p>

<p>I could do this several ways: just add the data at the end of every Controller, use a subclass of Model that adds my extra data, use a subclass of ModelAndView that wraps my Model, use a subclass of VelocityView that wraps the Model before using it... I'm sure there are other options.</p>

<p>But I have an "elegance" constraint: I don't want to write code in each and every Controller, I want this behavior defined in <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">one-and-only-one</a> place. Ideally, it would be controlled by my IOC bean config file.</p>

<p>Does anyone have a recommendation of how to achieve this elegantly?</p>

You could take a look at using Aspects.  Spring even has an
AOP
extension that you could use.
In brief an aspect would allow you to define code once that would then get "woven" into your classes either when you compile the classes or when they are loaded by the classloader.  It's relatively advanced stuff and isn't the most intuitive thing for new programmers to pick up, but it's intended to solve exactly the problem you're referring to.