Class PrototypeBeanContextItemProvider

  • All Implemented Interfaces:
    VelocityContextItemProvider, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public final class PrototypeBeanContextItemProvider
    extends Object
    implements VelocityContextItemProvider, org.springframework.context.ApplicationContextAware
    Looks up the named bean each time in the application context before setting it in the Velocity context. This is suitable for use with prototype beans that change based on the user, like "i18n" and "jsonator".
    • Constructor Detail

      • PrototypeBeanContextItemProvider

        public PrototypeBeanContextItemProvider()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • setContextKeyToBeanNameMapping

        public void setContextKeyToBeanNameMapping​(Map<String,​String> contextKeyToBeanName)