Reputation: 31
I have 2 starter modules: spring-boot-starter-vertx & spring-boot-starter-vertx-consul
consul starter depends on vertx starter
Intellij idea reports it cannot autowire Vertx bean for consul starter module (it's defined in vertx starter module)
But all modules build & run successfully by maven(include the module uses vertx & consul starters)
How to tell idea the Vertx bean is provided by another module to avoid the error report? (i've added ConditionalOnBean but the error remains)
Upvotes: 1
Views: 962
Reputation: 31
resolved with @Import(VertxConfiguration.class) on ConsulConfiguration
Upvotes: 2
Reputation: 3467
I think you need to define dependency of module in Intellij Idea. In this way Intellij build module in predefined order and set them in class path.
for more information: https://www.jetbrains.com/help/idea/creating-and-managing-modules.html#working-with-module-dependencies
Upvotes: 1