# dark-one
**Repository Path**: wu_xueming/dark-one
## Basic Information
- **Project Name**: dark-one
- **Description**: 一套开源轻量级的服务器解决方案,包含orm框架、TCP服务器、应用层服务器以及安全框架等,目前可以运行一个博客网站,还存在很多bug和性能问题,欢迎Coder们一起来研究,做一个自己的框架
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2023-05-11
- **Last Updated**: 2023-08-06
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Java, Framework, Database, Netty, MVC
## README
# DarkOne
_✨ 轻量级Java服务器框架 ✨_
-------
## 什么是DarkOne
_✨DarkOne,一个应用,一套解决!✨_
一套开源轻量级的服务器解决方案,包含orm框架、TCP服务器、应用层服务器以及安全框架等,目前可以运行一个博客网站,欢迎Coder们一起来研究,做一个自己的框架,一起交流技术!

## 特色
- 轻量级:专注服务器开发,架构更轻巧,让你的项目更小
- 易于开发:学习成本低,基于Spring、Netty的使用习惯开发,代码编写上手简单
- 海纳百川:一个框架,可自定义通信协议,可支持各种应用
## 镜像站
如果github卡顿,可以访问下面的Gitee国内镜像站
Github 传送门
Gitee 传送门
## 模块介绍
### byte-bye
_✨ ByteBye,发送你的数据,和你的数据君一路走好! ✨_
一个想写成类似于Netty一样的轻量级网络服务器,基于JavaNIO,使用React主从模式开发,可以自定义应用层协议解析器,目前已经编写了一个Http的协议解析器。
目前能够基于http搭建web应用,但是还存在一些bug和性能问题。
### byte-hi
_✨ByteHi,哈喽哈喽,数据君你来啦,来了就别走了!✨_
一个轻量级的半自动化ORM框架,简单易用,基于连接池封装开发。
### web-mvc
_✨高效,简洁易上手的webmvc框架! ✨_
基于SpringMVC的使用习惯开发的MVC框架,如果你熟悉Spring搭建web应用,那么你基本上可以零成本上手该框架。
下面是一个例子:
```java
import cn.darkone.entity.vo.ResultMessage;
import cn.darkone.utils.ResultUtil;
import cn.darkone.entity.dao.Member;
import cn.darkone.entity.enums.Sex;
import cn.darkone.framework.common.security.annotations.AccessLimit;
import cn.darkone.framework.common.web.annotations.GetMapping;
import cn.darkone.framework.common.web.annotations.PostMapping;
import cn.darkone.framework.common.web.annotations.RequestMapping;
import cn.darkone.framework.common.web.annotations.RestController;
import java.util.Arrays;
@RestController
@RequestMapping("/test")
public class TestController {
@AccessLimit(seconds = 60, maxCount = 10, needLogin = false)
@GetMapping({"/login", "/register"})
@PostMapping({"/login", "/register"})
public ResultMessage login(String account, String password, Integer code) {
return ResultUtil.data(new Member(account, password, code, null, null, null));
}
@AccessLimit(seconds = 60, maxCount = 10, needLogin = false)
@GetMapping({"/member"})
@PostMapping({"/member"})
public ResultMessage member(Member member) {
return ResultUtil.data(member);
}
@GetMapping({"/array1"})
public ResultMessage