3.2 Enable Component Scanning

This topic describes how to enable component scanning to automatically detect and register application components.

The Connector Service components must be discovered by Spring at application startup. Add the connector's base package to your @ComponentScan annotation:

@ComponentScan({"oracle.fsgbu.cmc.inc.file.connector"})
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

Note:

If component scanning is not configured, the connector beans — including event listeners and handlers — will not be initialized, and event callbacks will fail silently.