Class ScxContext

java.lang.Object
cool.scx.app.ScxContext

public final class ScxContext extends Object
用来存储 整个项目的上下文
Version:
0.0.1
Author:
scx567888
  • Constructor Details

    • ScxContext

      public ScxContext()
  • Method Details

    • scx

      public static Scx scx()
      获取全局的 Scx
      Returns:
      scx
    • featureConfig

      public static ScxFeatureConfig featureConfig()
    • config

      public static ScxConfig config()
    • dataSource

      public static DataSource dataSource()
    • httpServer

      public static cool.scx.http.ScxHttpServer httpServer()
    • eventBus

      public static EventBus eventBus()
    • webSocketRouter

      public static cool.scx.http.routing.WebSocketRouter webSocketRouter()
    • environment

      public static ScxEnvironment environment()
    • appKey

      public static String appKey()
    • scxModules

      public static ScxModule[] scxModules()
    • options

      public static ScxOptions options()
    • beanFactory

      public static org.springframework.beans.factory.BeanFactory beanFactory()
    • router

      public static ScxHttpRouter router()
    • scxWeb

      public static ScxWeb scxWeb()
    • getFeatureState

      public static boolean getFeatureState(ScxAppFeature scxFeature)
    • sqlRunner

      public static cool.scx.jdbc.sql.SQLRunner sqlRunner()
    • autoTransaction

      public static void autoTransaction(cool.scx.common.functional.ScxRunnable<?> handler)
    • autoTransaction

      public static <T> T autoTransaction(Callable<T> handler)
    • getBean

      public static <T> T getBean(Class<T> requiredType)
    • findScxModule

      public static <T extends ScxModule> T findScxModule(Class<T> clazz)
    • getPathByAppRoot

      public static Path getPathByAppRoot(String path)
    • getTempPath

      public static Path getTempPath()
    • getTempPath

      public static Path getTempPath(String... paths)
    • jdbcContext

      public static cool.scx.jdbc.JDBCContext jdbcContext()