程序包 cool.scx.core
类 ScxContext
java.lang.Object
cool.scx.core.ScxContext
用来存储 整个项目的上下文
- 版本:
- 1.11.8
- 作者:
- scx567888
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringappKey()appKey.static voidautoTransaction(cool.scx.functional.ScxRunnable<?> handler) 避免冗长的 调用static <T> TautoTransaction(Callable<T> handler) 避免冗长的 调用static org.springframework.beans.factory.BeanFactory返回当前运行的 scx 实例的 beanFactorystatic ScxConfigconfig()astatic DataSource获取 daostatic ScxEnvironmentappRoot.static io.vertx.core.eventbus.EventBuseventBus()astatic ScxFeatureConfigastatic <T extends ScxModule>
TfindScxModule(Class<T> clazz) 简化方法static <T> T简化方法static booleangetFeatureState(ScxCoreFeature scxFeature) 简化方法static PathgetPathByAppRoot(String path) 简化方法static Path获取临时路径static PathgetTempPath(String... paths) 获取临时路径static io.vertx.core.http.HttpServerastatic cool.scx.jdbc.JDBCContextstatic ScxOptionsoptions()astatic ScxHttpRouterrouter()astatic cool.scx.scheduler.ScxScheduler返回当前运行的 scx 实例的 schedulerstatic Scxscx()获取全局的 Scxstatic ScxModule[]所有模块static ScxMvcscxMvc()返回当前运行的 scx 实例的 scxMappingConfigurationstatic cool.scx.jdbc.sql.SQLRunner简化方法static io.vertx.core.Vertxvertx()返回当前运行的 scx 实例的 vertxstatic WebSocketRoutera
-
构造器详细资料
-
ScxContext
public ScxContext()
-
-
方法详细资料
-
scx
获取全局的 Scx- 返回:
- scx
-
featureConfig
a- 返回:
- a
-
config
a- 返回:
- a
-
dataSource
获取 dao- 返回:
- d
-
httpServer
public static io.vertx.core.http.HttpServer httpServer()a- 返回:
- a
-
eventBus
public static io.vertx.core.eventbus.EventBus eventBus()a- 返回:
- a
-
webSocketRouter
a- 返回:
- a
-
environment
appRoot.
- 返回:
- a
Fileobject
-
appKey
appKey.
- 返回:
- a
Stringobject
-
scxModules
所有模块- 返回:
- a
Listobject.
-
options
a- 返回:
- a
-
beanFactory
public static org.springframework.beans.factory.BeanFactory beanFactory()返回当前运行的 scx 实例的 beanFactory- 返回:
- a
-
router
a- 返回:
- a
-
vertx
public static io.vertx.core.Vertx vertx()返回当前运行的 scx 实例的 vertx- 返回:
- 全局的事件总线
-
scheduler
public static cool.scx.scheduler.ScxScheduler scheduler()返回当前运行的 scx 实例的 scheduler- 返回:
- a
-
scxMvc
返回当前运行的 scx 实例的 scxMappingConfiguration- 返回:
- a
-
getFeatureState
简化方法- 参数:
scxFeature- a- 返回:
- a
-
sqlRunner
public static cool.scx.jdbc.sql.SQLRunner sqlRunner()简化方法- 返回:
- a
-
autoTransaction
public static void autoTransaction(cool.scx.functional.ScxRunnable<?> handler) 避免冗长的 调用- 参数:
handler- handler
-
autoTransaction
避免冗长的 调用- 类型参数:
T- a- 参数:
handler- a- 返回:
- a
-
getBean
简化方法- 类型参数:
T- r- 参数:
requiredType- r- 返回:
- r
-
findScxModule
简化方法- 类型参数:
T- a T class- 参数:
clazz- aClassobject- 返回:
- a 模块
-
getPathByAppRoot
简化方法- 参数:
path- a- 返回:
- a
-
getTempPath
获取临时路径- 返回:
- a
-
getTempPath
获取临时路径- 参数:
paths- a- 返回:
- a
-
jdbcContext
public static cool.scx.jdbc.JDBCContext jdbcContext()
-