Class ResetSpringStaticCaches


  • public class ResetSpringStaticCaches
    extends java.lang.Object
    Reset various Spring static caches. It is safe to run multiple times, basically every time any configuration is changed.
    Author:
    Jiri Bubnik
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void reset()
      Reset all caches.
      static void resetBeanNamesByType​(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory)
      Spring bean by type cache.
      • Methods inherited from class java.lang.Object

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

      • ResetSpringStaticCaches

        public ResetSpringStaticCaches()
    • Method Detail

      • resetBeanNamesByType

        public static void resetBeanNamesByType​(org.springframework.beans.factory.support.DefaultListableBeanFactory defaultListableBeanFactory)
        Spring bean by type cache. Cache names change between versions, call via reflection and ignore errors.
      • reset

        public static void reset()
        Reset all caches.