A Spring application context is the container-managed registry that configures application components and makes them available for dependency injection. SpringApplicationBuilder.run creates it while starting a Spring Boot application. section 12.2
The context coordinates the main parts of a Kafka-enabled application:
- Scans configured base packages and registers classes annotated with @Component. section 12.2 section 12.2.1
- Injects dependencies such as KafkaTemplate into registered components through constructor or field autowiring. section 12.2.1
- Creates Kafka listener infrastructure for methods annotated with @KafkaListener, connecting them to Kafka consumers. section 12.2.1
- Starts without an embedded web server when WebApplicationType.NONE is selected for a non-web streaming application. section 12.2
Loan application processing
A Spring Boot main class builds the context, scans application packages, and starts the non-web application. The context discovers NewLoanApplicationProcessor, supplies its KafkaTemplate, and turns its listener method into a Kafka-consuming endpoint. That processor sends approved, rejected, and quality-assurance loan applications to separate topics.

