| 程序包 | 说明 |
|---|---|
| org.noear.solon | |
| org.noear.solon.core |
| 类和说明 |
|---|
| 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")
|
| XRouter
通用路由器
public class DemoApp{
public static void main(String[] args){
XApp.start(DemoApp.class, args,app->{
//
//路由手写模式
//
app.get("/hello/*",c->coutput("heollo world;"));
});
}
}
//
//容器自动模式
// |
| 类和说明 |
|---|
| XApp
应用管理中心
public class DemoApp{
public static void main(String[] args){
XApp.start(DemoApp.class, args);
}
}
|
| XRouter
通用路由器
public class DemoApp{
public static void main(String[] args){
XApp.start(DemoApp.class, args,app->{
//
//路由手写模式
//
app.get("/hello/*",c->coutput("heollo world;"));
});
}
}
//
//容器自动模式
// |
Copyright © 2020. All rights reserved.