binarywang / weixin-java-mp-multi-demo Goto Github PK
View Code? Open in Web Editor NEW微信公众号demo,基于WxJava 和 Spring MVC框架实现,支持多公众号
微信公众号demo,基于WxJava 和 Spring MVC框架实现,支持多公众号
支持多公众号的方式可以实现不增减代码吗,有什么好的建议
WxMenu menu = WxMenu.fromJson(a); 解析不成功
总体设计思路是采用多租户的模式,所有租户共用一套业务逻辑代码。
1、类似于集团+分店的模式
每张表里面都有集团code、分店code
每个集团一个公众号,甚至允许分店拥有自己的公众号
2、超级管理员在后台 分配集团管理员账号、并设置一个标识id
集团管理员登录后台配置微信各种参数、包括支付、菜单、素材等等。。。
3、在集团的公众号接入的地方,填上一个后台设置的这个标识id,
然后在程序里面处理这个id,用来标识这个公众号。
PS:目前像市面上的,有赞、微盟等很多做微商城的,他们做的是第三方公众平台,相当于是把公众号托管给了他们运营,他们具体的实现,我想应该也差不多这种吧
Hi, there are multiple versions of org.apache.commons:commons-lang3 in weixin-java-mp-multi-demo. As shown in the following dependency tree, according to Maven's “nearest wins” strategy, only org.apache.commons:commons-lang3:3.4 can be loaded, and org.apache.commons:commons-lang3:3.10 will be shadowed.
However, several methods defined in shadowed version org.apache.commons:commons-lang3:3.10 are referenced by client project via com.github.binarywang:weixin-java-mp:3.9.0, but missing in the actually loaded version org.apache.commons:commons-lang3:3.4.
For instance, the following missing methods(defined in org.apache.commons:commons-lang3:3.10) are actually referenced by weixin-java-mp-multi-demo, which will introduce a runtime error(i.e., "NoSuchMethodError") into weixin-java-mp-multi-demo.
1. org.apache.commons.lang3.StringUtils: java.lang.String replaceAll(java.lang.String,java.lang.String,java.lang.String) is invoked by weixin-java-mp-multi-demo via the following path:
paths------
<com.github.binarywang.demo.wx.mp.handler.SubscribeHandler: me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage handle(me.chanjar.weixin.mp.bean.message.WxMpXmlMessage,java.util.Map,me.chanjar.weixin.mp.api.WxMpService,me.chanjar.weixin.common.session.WxSessionManager)> weixin-java-mp-multi-demo\target\classes
<me.chanjar.weixin.mp.api.impl.WxMpUserServiceImpl: me.chanjar.weixin.mp.bean.result.WxMpUser userInfo(java.lang.String,java.lang.String)> Repositories\com\github\binarywang\weixin-java-mp\3.9.0\weixin-java-mp-3.9.0.jar
<me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl: java.lang.String get(me.chanjar.weixin.mp.enums.WxMpApiUrl,java.lang.String)> Repositories\com\github\binarywang\weixin-java-mp\3.9.0\weixin-java-mp-3.9.0.jar
<me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl: java.lang.String get(java.lang.String,java.lang.String)> Repositories\com\github\binarywang\weixin-java-mp\3.9.0\weixin-java-mp-3.9.0.jar
<me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl: java.lang.Object execute(me.chanjar.weixin.common.util.http.RequestExecutor,java.lang.String,java.lang.Object)> Repositories\com\github\binarywang\weixin-java-mp\3.9.0\weixin-java-mp-3.9.0.jar
<me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl: java.lang.Object executeInternal(me.chanjar.weixin.common.util.http.RequestExecutor,java.lang.String,java.lang.Object)> Repositories\com\github\binarywang\weixin-java-mp\3.9.0\weixin-java-mp-3.9.0.jar
<me.chanjar.weixin.common.util.DataUtils: java.lang.Object handleDataWithSecret(java.lang.Object)> Repositories\com\github\binarywang\weixin-java-common\3.9.0\weixin-java-common-3.9.0.jar
<org.apache.commons.lang3.StringUtils: java.lang.String replaceAll(java.lang.String,java.lang.String,java.lang.String)>
Upgrade direct dependency org.apache.commons:commons-lang3 from 3.4 to 3.10.
Thank you very much for your attention.
Best regards,
[INFO] com.github.binarywang:weixin-java-mp-multi-demo:war:0.0.1-SNAPSHOT
[INFO] +- com.github.binarywang:weixin-java-mp:jar:3.9.0:compile
[INFO] | \- com.github.binarywang:weixin-java-common:jar:3.9.0:compile
[INFO] | +- (org.slf4j:slf4j-api:jar:1.7.24:compile - omitted for conflict with 1.7.2)
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.11.1:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] | | \- (commons-codec:commons-codec:jar:1.9:compile - omitted for conflict with 1.10)
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5:compile
[INFO] | | \- (org.apache.httpcomponents:httpclient:jar:4.5:compile - omitted for duplicate)
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.24:compile
[INFO] | | \- (org.slf4j:slf4j-api:jar:1.7.24:compile - omitted for duplicate)
[INFO] | +- com.google.code.gson:gson:jar:2.8.0:compile
[INFO] | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | +- commons-io:commons-io:jar:2.5:compile
[INFO] | +- (org.apache.commons:commons-lang3:jar:3.10:compile - omitted for conflict with 3.4)
[INFO] | +- (com.google.guava:guava:jar:29.0-android:compile - omitted for conflict with 24.1.1-jre)
[INFO] | \- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] +- com.alibaba:fastjson:jar:1.2.31:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] +- com.google.guava:guava:jar:24.1.1-jre:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.2:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.2:compile
[INFO] | \- log4j:log4j:jar:1.2.17:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.3.2.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.2.RELEASE:compile
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-beans:jar:4.3.2.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-context:jar:4.3.2.RELEASE:compile
[INFO] | | +- (org.springframework:spring-aop:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | | \- (org.springframework:spring-expression:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-core:jar:4.3.2.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] | +- org.springframework:spring-expression:jar:4.3.2.RELEASE:compile
[INFO] | | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-web:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework:spring-web:jar:4.3.2.RELEASE:compile
[INFO] | +- (org.springframework:spring-aop:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-context:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:4.3.2.RELEASE:compile - omitted for duplicate)
[INFO] +- org.springframework.security:spring-security-core:jar:4.2.17.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- (org.springframework:spring-aop:jar:4.3.26.RELEASE:compile - omitted for conflict with 4.3.2.RELEASE)
[INFO] | +- (org.springframework:spring-beans:jar:4.3.26.RELEASE:compile - omitted for conflict with 4.3.2.RELEASE)
[INFO] | +- (org.springframework:spring-context:jar:4.3.26.RELEASE:compile - omitted for conflict with 4.3.2.RELEASE)
[INFO] | +- (org.springframework:spring-core:jar:4.3.26.RELEASE:compile - omitted for conflict with 4.3.2.RELEASE)
[INFO] | \- (org.springframework:spring-expression:jar:4.3.26.RELEASE:compile - omitted for conflict with 4.3.2.RELEASE)
[INFO] +- org.aspectj:aspectjrt:jar:1.8.9:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] \- com.fasterxml.jackson.core:jackson-databind:jar:2.10.0.pr1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.0.pr1:compile
[INFO] \- com.fasterxml.jackson.core:jackson-core:jar:2.10.0.pr1:compile
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.