Spring Boot multi-module: dependency module beans not loaded after mvn package (decorator bean ignored)
Summary The core issue is the Spring Boot fat jar’s classloader hierarchy and how it discovers @Configuration classes. When running from an IDE, the classpath is flat and contains all modules, allowing the component scan to easily pick up module-3. However, when packaged, Spring Boot’s LaunchedURLClassLoader prioritizes the jar’s own BOOT-INF/classes and nested jars over … Read more