# winter-api-util **Repository Path**: copy_admin/winter-api-util ## Basic Information - **Project Name**: winter-api-util - **Description**: A toolkit to facilitate spring boot development of the Restfull API - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-07-29 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # winter-api-util A toolkit to facilitate spring boot development of the Restful API ## Apache Maven ``` com.github.UncleCatMySelf winter-api-util 2.1.0 ``` ## How to use We offer the return class and return tool classes developed by the traditional restful API. Here is a demo If you use remember to add a scan path > @ComponentScan({"com.myself.winter"}) ```java @org.springframework.beans.factory.annotation.Autowired private ResultVOUtil resultVOUtil; @PostMapping("/send") public ResultVo send(@RequestParam String name,@RequestParam String msg){ Channel channel = (Channel) redisTemplate.getChannel(name); if (channel == null){ return resultVOUtil.error(555,"当前用户连接已断开"); } String result = SendUtil.sendTest(msg,channel); return resultVOUtil.success(result); } ``` You can use ResultVo and ResultVOUtil, For Resultvoutil, you can inject it directly. ## Author QQ group:628793702 ![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/%E5%85%AC%E4%BC%97%E5%8F%B7.png)