Class SpringUtils

java.lang.Object
cn.net.pap.example.proguard.util.SpringUtils
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.ApplicationContextAware

@Component public final class SpringUtils extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.context.ApplicationContextAware
  • Constructor Details

    • SpringUtils

      public SpringUtils()
  • Method Details

    • postProcessBeanFactory

      public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • 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
    • getBean

      public static <T> T getBean(String name) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
    • getBean

      public static <T> T getBean(Class<T> clz) throws org.springframework.beans.BeansException
      Throws:
      org.springframework.beans.BeansException
    • invokeMethod

      Throws:
      NoSuchMethodException
      SecurityException
      IllegalAccessException
      IllegalArgumentException
      InvocationTargetException