程序包 cool.scx.core
类 ScxContext
java.lang.Object
cool.scx.core.ScxContext
用来存储 整个项目的上下文
- 版本:
- 1.11.8
- 作者:
- scx567888
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidastatic void_routingContext(io.vertx.ext.web.RoutingContext routingContext) 设置当前线程的 routingContext 此方法正常之给 scxMappingHandler 调用 若无特殊需求 不必调用此方法static StringappKey()appKey.static voidautoTransaction(cool.scx.functional.ScxRunnable<?> handler) 避免冗长的 调用static <T> TautoTransaction(Callable<T> handler) 避免冗长的 调用static ScxBeanFactory返回当前运行的 scx 实例的 beanFactorystatic ScxConfigconfig()astatic ScxDaodao()获取 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 ScxOptionsoptions()astatic ScxHttpRouterrouter()astatic io.vertx.ext.web.RoutingContext获取当前线程的 RoutingContext (只限在 scx mapping 注解的方法及其调用链上)static ScxScheduler返回当前运行的 scx 实例的 schedulerstatic Scxscx()获取全局的 Scxstatic ScxMappingConfiguration返回当前运行的 scx 实例的 scxMappingConfigurationstatic ScxModule[]所有模块static SQLRunner简化方法static ScxTemplatetemplate()返回当前运行的 scx 实例的 templatestatic io.vertx.core.Vertxvertx()返回当前运行的 scx 实例的 vertxstatic ScxWebSocketRoutera
-
构造器详细资料
-
ScxContext
public ScxContext()
-
-
方法详细资料
-
routingContext
public static io.vertx.ext.web.RoutingContext routingContext()获取当前线程的 RoutingContext (只限在 scx mapping 注解的方法及其调用链上)- 返回:
- 当前线程的 RoutingContext
-
_routingContext
public static void _routingContext(io.vertx.ext.web.RoutingContext routingContext) 设置当前线程的 routingContext 此方法正常之给 scxMappingHandler 调用 若无特殊需求 不必调用此方法- 参数:
routingContext- 要设置的 routingContext
-
_clearRoutingContext
public static void _clearRoutingContext()a -
scx
获取全局的 Scx- 返回:
- scx
-
featureConfig
a- 返回:
- a
-
config
a- 返回:
- a
-
dao
获取 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
返回当前运行的 scx 实例的 beanFactory- 返回:
- a
-
router
a- 返回:
- a
-
template
返回当前运行的 scx 实例的 template- 返回:
- a
-
vertx
public static io.vertx.core.Vertx vertx()返回当前运行的 scx 实例的 vertx- 返回:
- 全局的事件总线
-
scheduler
返回当前运行的 scx 实例的 scheduler- 返回:
- a
-
scxMappingConfiguration
返回当前运行的 scx 实例的 scxMappingConfiguration- 返回:
- a
-
getFeatureState
简化方法- 参数:
scxFeature- a- 返回:
- a
-
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
-