This project is a simple Spring Boot application that counts the number of beans defined in the application context. It exposes this information through a REST API.
The Bean Counter Application is designed to demonstrate how to count the beans in a Spring application context. It uses Spring Boot for rapid setup and configuration and includes a RESTful endpoint to expose the bean count.
Counts the total number of beans in the context of the application. Exposes a REST endpoint to retrieve the bean count. Utilizes Spring Boot's CommandLineRunner to print the bean count at startup.
To install and run the application locally:
git clone https://github.com/your-username/bean-counter.git cd bean-counter
mvn clean install
mvn spring-boot:run
Once the application runs, it will automatically count the number of beans and print this information to the console. You can also retrieve the bean count via the exposed REST API.
GET /bean-count: Returns the total number of beans in the context of the application.
curl -X GET http://localhost:8080/bean-count
42
-Java -Spring Boot -Maven