春季启动升级从2.6.6到2.7.1 -dev.miku:r2dbc -mysql
我将Spring Boot从2.6.6升级到2.7.1,并运行到R2DBC-MYSQL错误中。
使用Spring Boot 2.6.6,我正在使用R2DBC-MYSQL。
runtimeOnly 'dev.miku:r2dbc-mysql'
将Spring Boot升级到2.7.1之后,会出现汇编错误。
因此,从build.gradle中评论了上述内容,并在运行时获得下面的错误。
Caused by: java.lang.IllegalStateException: Unable to create a ConnectionFactory for 'ConnectionFactoryOptions{options={database=test, host=app-dev-mysql.sdferf1234.us-east-2.rds.amazonaws.com, driver=mysql, password=REDACTED, protocol=, port=3306, user=test}}'. Available drivers: [ pool ]
at io.r2dbc.spi.ConnectionFactories.get(ConnectionFactories.java:143) ~[r2dbc-spi-0.9.1.RELEASE.jar:?]
at org.springframework.boot.r2dbc.ConnectionFactoryBuilder$OptionsCapableWrapper.buildAndWrap(ConnectionFactoryBuilder.java:191) ~[spring-boot-2.7.1.jar:2.7.1]
at org.springframework.boot.r2dbc.ConnectionFactoryBuilder$PoolingAwareOptionsCapableWrapper.buildAndWrap(ConnectionFactoryBuilder.java:207) ~[spring-boot-2.7.1.jar:2.7.1]
at org.springframework.boot.r2dbc.ConnectionFactoryBuilder.build(ConnectionFactoryBuilder.java:177) ~[spring-boot-2.7.1.jar:2.7.1]
at org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryConfigurations.createConnectionFactory(ConnectionFactoryConfigurations.java:68) ~[spring-boot-autoconfigure-2.7.1.jar:2.7.1]
at org.springframework.boot.autoconfigure.r2dbc.ConnectionFactoryConfigurations$GenericConfiguration.connectionFactory(ConnectionFactoryConfigurations.java:121) ~[spring-boot-autoconfigure-2.7.1.jar:2.7.1]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:577) ~[?:?]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.21.jar:5.3.21]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.21.jar:5.3.21]
at org.springframework.data.r2dbc.config.AbstractR2dbcConfiguration.lookupConnectionFactory(AbstractR2dbcConfiguration.java:236) ~[spring-data-r2dbc-1.5.1.jar:1.5.1]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用
实现组:'dev.miku',名称:'r2dbc-mysql',版本:'0.8.2.release'
而不是runtime> runtimeonly'dev.miku:r2dbc-mysql''
,我遇到了同样的问题,对我有用。Try with
implementation group: 'dev.miku', name: 'r2dbc-mysql', version: '0.8.2.RELEASE'
instead ofruntimeOnly 'dev.miku:r2dbc-mysql'
, I had the same issue and it worked for me.用户1578872。
作为
io.asyncer的维护者:r2dbc-mysql
,我想通知您,您所面临的问题的根本原因是Spring Boot 2.7.1使用R2DBC-SPI :0.9.1.Release
,而dev.miku:r2dbc-mysql:0.8.2
支持R2DBC-SPI:0.8。*
。我建议您切换到使用io.asyncer:r2dbc-mysql:0.9.2
,它支持r2dbc-spi:0.9.1.release
,是<代码> dev.miku:r2dbc-mysql 。以下是当前兼容性表
2.6 -mysql 基础戴上您当前的春季启动版。
有关更多信息,您可以通过。如果您还有其他问题或遇到任何问题,请随时在存储库中创建问题。我们在这里为您提供帮助!
谢谢你!
user1578872.
As the maintainer of
io.asyncer:r2dbc-mysql
, I would like to inform you that the root cause of the issue you're facing is that Spring Boot 2.7.1 usesr2dbc-spi:0.9.1.RELEASE
, whereasdev.miku:r2dbc-mysql:0.8.2
supportsr2dbc-spi:0.8.*
. I suggest you switch to usingio.asyncer:r2dbc-mysql:0.9.2
, which supportsr2dbc-spi:0.9.1.RELEASE
and is the official successor todev.miku:r2dbc-mysql
.below is the current compatibility table
Please make sure to use the appropriate version of
r2dbc-mysql
base don your current Spring boot version.For more information, you can visit the official repository at https://github.com/asyncer-io/r2dbc-mysql. If you have any further questions or run into any issues, please feel free to create an issue in the repository. We're here to help!
Thank you!