Gradle submodule available only for component scan

23 views Asked by At

I have a gradle multi-module project to integrate with different systems.

So I have a main module(say Integration) And serveral submodules for each system(Sub1, Sub2, etc)

The plan is,

  • To have different modules for each system that we integrate with and have the implementations from those modules used dynamically using factory or some other loosely coupled patterns.

  • The modules Sub1, Sub2, etc will use classes from Integration directly but not the other way around.

  • I have my settings.gradle this way,

rootProject.name = 'IntegrationProject'

include 'Integration'
include(":Sub1")
project(":Sub1").projectDir = file("Sub1")
  • And in the Sub* projects I have dependency definition to use the implementation from Integration module directly. And it works.

But when I run the application class annotated with @SpringBootApplication, it's not scanning the classes in Sub1 module. How to achieve this?

0

There are 0 answers