You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I face a case where I want to "enhance" the DSLContext provided by JOOQ, to leverage MetricsDSLContext features of Micrometer.
However, such "decorator" is complicated to configure in Spring Boot, due to the restriction on depdendency cycles.
And it's not possible to only inject the org.jooq.Configuration bean, because it's created only if there is no bean of type DSLContext defined… and I define one 🤷
wilkinsona
changed the title
feat(jooq): provide the org.jooq.Configuration for alternative DSLContext usage
Provide the org.jooq.Configuration for alternative DSLContext usage
Sep 20, 2024
I agree, but I reported this issue because I had the same problem before introduction of r2dbc in spring-boot using jooq. In that context, the bean postprocessor was not a possible solution.
So, would you like a PR to split org.jooq.Configuration and DSLContext auto configuration, so we leverage the first even if the second is under configuration?
wilkinsona
changed the title
Provide the org.jooq.Configuration for alternative DSLContext usage
Allow auto-configured org.jooq.Configuration to be used to create a custom DSLContext
Sep 23, 2024
Hello 👋
I face a case where I want to "enhance" the
DSLContext
provided by JOOQ, to leverageMetricsDSLContext
features of Micrometer.However, such "decorator" is complicated to configure in Spring Boot, due to the restriction on depdendency cycles.
I wanted to do something like this, but it fails:
And it's not possible to only inject the
org.jooq.Configuration
bean, because it's created only if there is no bean of typeDSLContext
defined… and I define one 🤷I had to do that in my code to have something ok:
The
@EnableConfigurationProperties(JooqProperties::class)
andfun jooqConfiguration
comes from the Spring code base #copypasteThis limitation is the result of the
DslContextConfiguration
class, it hosts both theDSLContext
andConfiguration
beans.Would it be possible to split it to allow users to use the predefined
Configuration
generated by Spring Boot without theDSLContext
?If it's ok for you, I'll be glad to open a PR, but I wanted to present the case before doing an implementation.
Thank you!
The text was updated successfully, but these errors were encountered: