of-weixin-api 微信快速接入方案开源项目

我要开发同款
匿名用户2018年07月19日
119阅读

技术信息

开源地址
https://gitee.com/oufu/of-weixin-api
授权协议
MIT

作品详情

of-weixi-api快速接入几行代码实现微信接入项目介绍

为微信开发者提供快速接入方案、未依赖任何第三方mvc框架,支持所用javaweb框架接入。

安装教程

Mave引用

<depedecy><groupId>com.ofsoft</groupId><artifactId>of-weixi-api</artifactId><versio>0.0.1-RELEASES</versio></depedecy>文档地址

文档地址: https://gitee.com/oufu/of-weixi-api/wikis

使用说明

Sprigmvc

@Cotroller  public class WeiXiActio exteds MessageCotroller {         //入口@RequestMappig(value = "/wx/idex")public void idex(HttpServletRequest request, HttpServletRespose respose) {Dispatcher.doDispatch(request, respose, this);}@Overridepublic MessageRespose textTypeMsg(MessageRequest params) {TextMessage msg = ew TextMessage();msg.setCotet(params.getParam("Cotet"));retur msg;}}

Jfial

@Actio(path = "/wx")public class WeixiCotroller exteds BaseCotroller {        //入口public void idex() {Dispatcher.doDispatch(getRequest(), getRespose(),ew DefaultCotroller());rederNull();}}

Servlet配置

@WebServlet(ame = "coreIit", loadOStartup = 1, urlPatters = { "/wx/sig.html" })public class Iit exteds HttpServlet {private static fial log serialVersioUID = 1L;            @Overridepublic void iit(ServletCofig cofig) throws ServletExceptio {// 设置配置信息// AppCofig.setCofig(appid, appSecret, toke);AppCofig.getIstace().iit(ew DefaultCotroller());}        //入口@Overrideprotected void service(HttpServletRequest request,HttpServletRespose respose) throws ServletExceptio, IOExceptio {Dispatcher.doDispatch(request, respose);}

}4.自定义类继承MessageCotroller实现自己需求的方法

publicclassDefaultCotrollerextedsMessageCotroller{

@Overridepublic MessageRespose textTypeMsg(MessageRequest params) {TextMessage msg = ew TextMessage();msg.setCotet("测试");retur msg;}

}

技术文档

作者博客 https://blog.csd.et/oufua 欢迎大家完善!

功能介绍

of-weixin-api 快速接入 几行代码实现微信接入 项目介绍 为微信开发者提供快速接入方案、未依赖任何第三方mvc框架,支持所用java web 框架接入。 安装教程 Maven引用   ...

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论