Changed to constructor injection for java configuration.