mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-11-29 18:28:01 +08:00
add: README也来个NB的demo
This commit is contained in:
parent
eed71a390a
commit
81a16a1ee3
25
README.md
25
README.md
@ -1,6 +1,31 @@
|
||||
# nutzboot
|
||||
简称NB
|
||||
|
||||
## 来个NB的demo
|
||||
|
||||
```java
|
||||
package io.nutz.demo.simple;
|
||||
|
||||
import org.nutz.boot.NbApp;
|
||||
import org.nutz.ioc.loader.annotation.*;
|
||||
import org.nutz.mvc.annotation.*;
|
||||
|
||||
@IocBean
|
||||
public class MainLauncher {
|
||||
|
||||
@Ok("raw")
|
||||
@At("/time/now")
|
||||
public long now() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new NbApp(MainLauncher.class).run();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### 开发计划
|
||||
|
||||
- [ ] 基础框架
|
||||
|
Loading…
Reference in New Issue
Block a user