234 Star 846 Fork 244

GVPNutz / nutzboot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
QuickStart.md 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
Wendal 提交于 2019-10-21 22:46 . update: 调整README文档

快速预览一下NB的项目吧

pom.xml

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-parent</artifactId>
            <version>${nutzboot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>org.nutz</groupId>
        <artifactId>nutzboot-starter-jetty</artifactId>
    </dependency>
    <dependency>
        <groupId>org.nutz</groupId>
        <artifactId>nutzboot-starter-nutz-mvc</artifactId>
    </dependency>
</dependencies>

src/main/java/io/nutz/demo/simple/MainLauncher.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().run();
    }
}

asciicast

请访问 https://get.nutz.io 获取属于您的基础代码

Java
1
https://gitee.com/nutz/nutzboot.git
git@gitee.com:nutz/nutzboot.git
nutz
nutzboot
nutzboot
dev

搜索帮助