# DServer **Repository Path**: idolMax/DServer ## Basic Information - **Project Name**: DServer - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-04-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 1.org.xserver.bootstrap.XServerBootstrapAPI 是启动入口 applicationContext.xml 是spring 入口 redis.properties 指代和redis相关的配置 默认配置地址127.0.0.1 端口6380 xserver-http.properties 是配置容器的相关参数 默认请求端口 9000 直接请求 http://localhost:9000/sampleApi/login?userId=1&password=2 表示http请求 参数 userId passwd 同时返回token 以后每次请求携带 即可在前置拦截中校验 若不想此接口 校验token 可在filterContext.xml excludePaths中配置 http://localhost:9000/sampleApi/trade?userId=1&password=2 此请求会返回token 为空 http://localhost:9000/sampleApi/trade?userId=1&price=1&token=149b842d-5102-4249-8b3d-d3beb20217b3 此请求token 校验通过 2.演示步骤 main函数启动XServerBootstrapAPI Seller.html Buyer.html 将上述文件在浏览器中打开 默认连接上websocket 长连接 服务端返回的应答消息 在KeepAliveWebsocketResolver中有定时任务向页面推送时间消息 正式时, 将sendTestMessageToAll去掉 3.交易 Seller.html Buyer.html 页面分别 卖家先发送价格 买家发送价格 撮合 这里只做了买家去撮合的逻辑 卖家撮合逻辑一样 撮合只拿到买卖双方的信息,没有后续业务逻辑