Replies: 1 comment 1 reply
-
In this case, you need to inject named |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm having some trouble setting up a read-only 2nd datasource, with
jdbi
. I got some pointers and was able to put together something: I added the gradle depencencies and enabled Micronaut Data. The@Transactional
and@ReadOnly("readonly")
annotations work as I seeTransactionalInterceptor
is being called. Butjdbi
is not aware of the annotations, there're twojdbi
instances@Named("default")
and@Named("readonly")
are provided byJdbiFactory
. If I inject both instances into a repository, how do I make sure the correct one is picked up? My simplified setup is as follows:jdbi
without @nAmed is always the default data source, so my current setup won't work, it's only picking up the default datasource.Beta Was this translation helpful? Give feedback.
All reactions