程序包 com.sh.spring

类 SHSpringUtil

java.lang.Object
com.sh.spring.SHSpringUtil

public class SHSpringUtil extends Object

Description:

Title:首亨软件 - 聚天平台

从以下版本开始:
2022年6月24日
  • 构造器详细资料

    • SHSpringUtil

      public SHSpringUtil()
  • 方法详细资料

    • initSpringBoot

      public static void initSpringBoot(org.springframework.context.ApplicationContext applicationContext)
      初始化springboot
    • getApplicationContext

      public static org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public static void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
    • getBean

      public static Object getBean(String name)
      通过name获取 Bean.
      参数:
      name -
      返回:
    • getString

      public static String getString(String name)
    • getString

      public static String getString(String name, String defaultValue)
    • getInt

      public static int getInt(String name)
    • getInt

      public static int getInt(String name, int defaultValue)
    • getBoolean

      public static boolean getBoolean(String name)
    • getBoolean

      public static boolean getBoolean(String name, boolean defaultValue)
    • getStaticPath

      public static String getStaticPath()
      获取static目录,运行获取到的是编译后的目录
      返回:
    • isStartupFromJar

      public static boolean isStartupFromJar()
      判断是否以jar包方式启动
      返回:
    • isSpringboot

      public static boolean isSpringboot()
      判断是否spring boot项目
      返回:
    • getBean

      public static <T> T getBean(Class<T> clazz)
      通过class获取Bean.
      类型参数:
      T -
      参数:
      clazz -
      返回:
    • getBean

      public static <T> T getBean(String name, Class<T> clazz)
    • updateEnvironmentValue

      public static void updateEnvironmentValue(String key, String value)
      更新变量值
      参数:
      key -
      value -