| 类 | 说明 |
|---|---|
| XApp |
应用管理中心
public class DemoApp{
public static void main(String[] args){
XApp.start(DemoApp.class, args);
}
}
|
| XAppProperties |
统一配置加载器
//
// 手动获取配置模式(容器自动模式可用: @XInject("${water.logger}"))
//
XApp.cfg()
XApp.cfg().isDebugMode()
XApp.cfg().isDriftMode()
XApp.cfg().get("water.logger")
XApp.cfg().getProp("db1")
|
| XGateway |
本地网关
提供容器,重新组织处理者运行;只支持HASH路由
|
| XRouter |
通用路由器
public class DemoApp{
public static void main(String[] args){
XApp.start(DemoApp.class, args,app->{
//
//路由手写模式
//
app.get("/hello/*",c->coutput("heollo world;"));
});
}
}
//
//容器自动模式
// |
| XUtil |
内部专用工具
|
Copyright © 2020. All rights reserved.