# Distributed Server **Repository Path**: hebinhui/server-0.0.1 ## Basic Information - **Project Name**: Distributed Server - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 13 - **Created**: 2018-02-24 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 该款软件是基于netty开发的分布式后端软件.只有jar方式存在,不依靠tomcat,jetty 支持功能 1通用的mvc功能,支持文本渲染,VelocityEngine渲染,文件上传和文件下载,session,cookie 2支持服务器见自动通信,为其核心功能 3支持分布式的任务调度
package beautiful.butterfly;

import beautiful.butterfly.server.httpserver.mvc.aop.AllowNotLogin;
import beautiful.butterfly.server.httpserver.mvc.core.Controller;
import beautiful.butterfly.server.httpserver.mvc.core.annotation.actionbind.ActionKey;
import beautiful.butterfly.server.httpserver.mvc.render.Render;
import beautiful.butterfly.server.httpserver.mvc.render.TextRender;
import beautiful.butterfly.server.httpserver.mvc.render.VelocityRender;

import java.util.ArrayList;
import java.util.List;

@ActionKey("/index")
public class Test extends Controller {
    @AllowNotLogin
    public Render hello() {
        return new TextRender("hello");
    }

    @AllowNotLogin
    public Render world() {
        setAttribute("hello", "你好");
        setAttribute("world", "世界");
        List list = new ArrayList();
        list.add("测试1");
        list.add("测试2");
        setAttribute("list", list);
        return new VelocityRender("/hellovelocity.vm");
    }

}

set PATH= %PATH%;E:\czh\p\server_product\lib;E:\czh\p\server_product\service_lib;
E:\czh\p\server_product   java main.MainTest