Why is injecting @Bean from different modules allowed? #1214
Unanswered
alfonsoristorato
asked this question in
Q&A
Replies: 1 comment
-
I've created an example project that mirrors our setup to show case the issue in question: https://github.com/alampada/modulith-beans/blob/main/src/main/kotlin/com/example/modulith/beans/a/DependantService.kt In our test, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there, my company decided to use modulith for a Greenfield project, and I am all for it and learning new stuff.
We have setup our project and started playing around with it, the
.verify()
works quite well in indicating us what injections are allowed and which aren't, however I noticed that@Bean
are not verified along. This allows us to create a specificWebClient
@Bean
(for example) in module A and inject it in module B without modulith ever complaining about it.I am trying to find info online and in the discussion here, but not finding much unfortunately. Is this an intended feature, or is there a way to disable such injections?
Beta Was this translation helpful? Give feedback.
All reactions