http-server
这是一个http服务程序
http-server是server程序,提供socket连接,http报文处理
http-test是应用层配置处理的例子,提供业务层处理
git地址:https://github.com/90duc/http-server
1、加入依赖
<dependency><groupId>com.mk.server</groupId><artifactId>http-server</artifactId><version>1.0</version>
</dependency>
2、标注启动类型
@HttpServerBoot(port = 8000)
public class App
{public static void main(String[] args){HttpServer.run(App.class, args);}
}
3、请求配置例子
@RequestMapping(value = "/b")
public class BServlet implements HttpServlet {@Overridepublic void service(HttpRequest request, HttpResponse response) {response.setBody("test b");}
}