WxJava icon indicating copy to clipboard operation
WxJava copied to clipboard

springboot3.0下WxMpService无法自动注入问题

Open bobinghua opened this issue 3 years ago • 5 comments

简要描述

升级Springboot版本至3.0之后启动项目提示me.chanjar.weixin.mp.api.WxMpService无法自动注入

模块版本情况

  • WxJava 模块名: wx-java-mp-spring-boot-starter
  • WxJava 版本号: 4.3.0
  • JDK版本:17
  • Springboot版本:3.0.11

详细描述

升级Springboot版本至3.0之后启动项目提示me.chanjar.weixin.mp.api.WxMpService无法自动注入,经测试Srpingboot2.7.16无此问题(对应jdk版本11)

日志

***************************
APPLICATION FAILED TO START
***************************

Description:

Field mpService in com.binarywang.demo.wx.mp.MpDemoApplication required a bean of type 'me.chanjar.weixin.mp.api.WxMpService' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'me.chanjar.weixin.mp.api.WxMpService' in your configuration.

bobinghua avatar Oct 18 '23 02:10 bobinghua

wx-java-mp-spring-boot-starter 升级到至少 4.4.8.B 版本,建议最好升级到最新版本

foreveryang321 avatar Oct 18 '23 05:10 foreveryang321

wx-java-mp-spring-boot-starter 升级到至少 4.4.8.B 版本,建议最好升级到最新版本

升级到4.5.0之后又会出现Jedis初始化异常的问题,所以我才选择的4.3.0。。。

bobinghua avatar Oct 18 '23 07:10 bobinghua

wx-java-mp-spring-boot-starter 升级到至少 4.4.8.B 版本,建议最好升级到最新版本

升级到4.5.0之后又会出现Jedis初始化异常的问题,所以我才选择的4.3.0。。。

看这个 https://github.com/Wechat-Group/WxJava/issues/3129 ,建议升级到 4.5.5.B 吧

foreveryang321 avatar Oct 18 '23 07:10 foreveryang321

wx-java-mp-spring-boot-starter 升级到至少 4.4.8.B 版本,建议最好升级到最新版本

升级到4.5.0之后又会出现Jedis初始化异常的问题,所以我才选择的4.3.0。。。

看这个 #3129 ,建议升级到 4.5.5.B 吧

好的,刚试了这个版本确实可以,谢谢你

bobinghua avatar Oct 18 '23 07:10 bobinghua

image A component required a bean of type 'cn.binarywang.wx.miniapp.api.WxMaService' that could not be found. 环境:jdk17 boot3.1.7

ccxyChuzhong avatar Jul 09 '24 02:07 ccxyChuzhong