Class SpringPlugin

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] basePackagePrefixes  
    • Constructor Summary

      Constructors 
      Constructor Description
      SpringPlugin()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void cglibAopProxyDisableCache​(org.hotswap.agent.javassist.CtClass ctClass)  
      void init()  
      void init​(java.lang.String version)  
      static void register​(org.hotswap.agent.javassist.CtClass clazz)
      Plugin initialization is after Spring has finished its startup and freezeConfiguration is called.
      void registerBasePackageFromConfiguration()
      register base package prefix from configuration file
      void registerComponentScanBasePackage​(java.lang.String basePackage)
      Register both hotswap transformer AND watcher - in case of new file the file is not known to JVM and hence no hotswap is called.
      void registerResourceListeners​(java.net.URL url)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • basePackagePrefixes

        public static java.lang.String[] basePackagePrefixes
    • Constructor Detail

      • SpringPlugin

        public SpringPlugin()
    • Method Detail

      • init

        public void init()
      • init

        public void init​(java.lang.String version)
      • registerResourceListeners

        @OnResourceFileEvent(path="/",
                             filter=".*.xml",
                             events=MODIFY)
        public void registerResourceListeners​(java.net.URL url)
      • registerBasePackageFromConfiguration

        public void registerBasePackageFromConfiguration()
        register base package prefix from configuration file
      • registerComponentScanBasePackage

        public void registerComponentScanBasePackage​(java.lang.String basePackage)
        Register both hotswap transformer AND watcher - in case of new file the file is not known to JVM and hence no hotswap is called. The file may even exist, but until is loaded by Spring it will not be known by the JVM. File events are processed only if the class is not known to the classloader yet.
        Parameters:
        basePackage - only files in a basePackage
      • register

        @OnClassLoadEvent(classNameRegexp="org.springframework.beans.factory.support.DefaultListableBeanFactory")
        public static void register​(org.hotswap.agent.javassist.CtClass clazz)
                             throws org.hotswap.agent.javassist.NotFoundException,
                                    org.hotswap.agent.javassist.CannotCompileException
        Plugin initialization is after Spring has finished its startup and freezeConfiguration is called. This will override freeze method to init plugin - plugin will be initialized and the configuration remains unfrozen, so bean (re)definition may be done by the plugin.
        Throws:
        org.hotswap.agent.javassist.NotFoundException
        org.hotswap.agent.javassist.CannotCompileException
      • cglibAopProxyDisableCache

        @OnClassLoadEvent(classNameRegexp="org.springframework.aop.framework.CglibAopProxy")
        public static void cglibAopProxyDisableCache​(org.hotswap.agent.javassist.CtClass ctClass)
                                              throws org.hotswap.agent.javassist.NotFoundException,
                                                     org.hotswap.agent.javassist.CannotCompileException
        Throws:
        org.hotswap.agent.javassist.NotFoundException
        org.hotswap.agent.javassist.CannotCompileException