使用netty写的一个web服务器,封装了异步请求和JDBC

Minicat!

使用的是netty,还特地给它一个名称,有点儿像tomcat。

  • 用户还可以使用ajax异步来请求数据,并返回JSON数据。其中不足的是在ReflectMethod类中,只能匹配方法参数为String,Integer,Long类型的参数,希望你们能给出更好的解决办法。
  • 封装了JDBC的接口,用户可以实现自己的逻辑处理;使用自定义线程池来管理数据库连接。

用户只需配置mapping.properties文件

#Key:user Request Directory,Value:class full name and method name
#Unified management of requests under the same directory
/usr/getone=com.messi.web.minicat.test.Test,getUser
/usr/register=com.messi.web.minicat.test.Test,register
#Configure the location of html, css, JS files
resoucespath=G:\\idea project\\minicat\\src\\main\\resources
#The path of the picture
pictureLocation=C:\\Users\\duncan\\Desktop\\Messi\\Messi\\desk1625

KEY:/usr/getone:用户请求的路径,如http://ip:端口号/usr/getone

Value:就是要执行的某个类的某个方法

最后附上GitHub的地址:https://github.com/DuncanPlayer/minicat

多谢大家指教

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值