sachin jain
sachin jain

Reputation: 224

spring-boot-starter include exclusively

I have 2 spring boot starter projects. Project A and project B. Project A includes B as a dependency.

Now I have project C(non spring boot starter) that includes project A. There are certain beans that are created in A that depend on beans in B. I was assuming that since A includes B all the beans that are needed in A as a dependency from B will be available since A includes B. But that is not happening. Does that mean I have to include B exclusively in C?

Upvotes: 2

Views: 40

Answers (1)

artemisian
artemisian

Reputation: 3106

Does that mean I have to include B exclusively in C?

No.

If you are using maven 2.0+ and B is dependency of A then once you include A as a dependency of C, B will also be included in C as a transitive dependency of A. If you cannot find the bean from project B when running project C then most likely there is some problem with your spring configuration.

Upvotes: 1

Related Questions