如何解决如何修复“考虑在您的配置中定义类型为 'org.jooq.DSLContext' 的 bean”更新到 jOOQ 3.15.0 后
在我的 Vaadin 和 Spring Boot 应用程序中,我已从 jOOQ 3.14.12 更新到 3.15.0。此更新后,我的应用程序不再启动。这是我得到的错误:
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in org.komunumo.data.service.MemberService required a bean of type 'org.jooq.DSLContext' that could not be found.
Action:
Consider defining a bean of type 'org.jooq.DSLContext' in your configuration.
我不明白为什么我必须定义这个 bean,因为使用 jOOQ 3.14.12 我没有必要。据我所知,这是由 JooqAutoConfiguration
自动完成的。
解决方法
从 jOOQ 3.15.0 开始,jOOQ 附带一个内置的 R2DBC 依赖项。 Spring Boot 2.5 尚未意识到这一点,因此,您必须从 Spring Boot 应用程序中明确排除 R2dbcAutoConfiguration
(当然,除非您将 R2DBC 与 jOOQ 结合使用):
@SpringBootApplication(exclude = { R2dbcAutoConfiguration.class })
这应该在 Spring Boot 2.6 中修复,参见 https://github.com/spring-projects/spring-boot/issues/26439
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。