force spring mvc to use an extended freemarker configurer
===

I have Spring MVC web application using Freemarker for web page templating. I need a certain object from the database to be in Freemarker configuration shared variables. So i extended the FreemarkerConfigurer from Spring and overrided the createConfiguration() methode. It now returns a new configuration with in its shareVariables my object. Then I declared my extended FreemarkerConfigurer in the application context.
But when i run the application, my freemarker templates don't find the shared object.
Can you tell me please what's wrong with my configuration?
Thank you.