在我的 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 尚未意识到这一点,因此,您必须明确排除 R2dbcAutoConfiguration
从您的 spring 启动应用程序(当然,除非您使用带有 jOOQ 的 R2DBC):
@SpringBootApplication(exclude = { R2dbcAutoConfiguration.class })
这应该在 Spring Boot 2.6 中修复,参见 https://github.com/spring-projects/spring-boot/issues/26439
关于spring - 如何在您的配置中修复 "Consider defining a bean of type ' org.jooq.DSLContext'。”更新到 jOOQ 3.15.0 后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68297295/