Welcome to the comprehensive Spring Boot Academy lab series focused on Spring Boot Actuator and Spring Transactions. This series provides progressive, hands-on learning experiences designed to take you from basic concepts to advanced implementation patterns.
This lab series is structured to provide a complete learning path for Spring Boot developers who want to master production-ready monitoring, management, and transaction capabilities. Each lab builds upon the previous one, ensuring a solid foundation before moving to more complex concepts.
- Difficulty: Easy
- Focus: Enabling and exploring basic actuator endpoints
- Key Concepts:
/health
,/info
,/actuator
, endpoint exposure - Outcome: Understand fundamental actuator capabilities
- Difficulty: Intermediate
- Focus: Creating custom health indicators for application-specific monitoring
- Key Concepts:
HealthIndicator
interface, custom health checks, external service monitoring - Outcome: Build application-specific health monitoring
- Difficulty: Intermediate
- Focus: Creating custom read-only and writable endpoints
- Key Concepts:
@Endpoint
,@ReadOperation
,@WriteOperation
, endpoint security - Outcome: Implement custom management and monitoring endpoints
- Difficulty: Easy
- Focus: Introduction to Spring transaction management
- Key Concepts:
@Transactional
, ACID properties, transaction rollback - Outcome: Implement basic transaction scenarios
- Difficulty: Advanced
- Focus: Complex transaction patterns and propagation
- Key Concepts: Transaction propagation, isolation levels, nested transactions
- Outcome: Handle complex transaction scenarios
- Java 17 or higher
- Gradle 7.0 or higher
- Basic understanding of Spring Boot
- Familiarity with REST APIs and databases
- Clone or download this repository
- Navigate to any lab directory (e.g.,
lab1-basic-actuators-and-endpoints
) - Run the application:
./gradlew bootRun
- Follow the lab instructions in the
README.md
file
Each lab includes:
- Ready-to-run Spring Boot applications
- Proper package organization
- Gradle build configuration
- Database setup and configuration
- Clear, numbered instructions
- Code snippets with explanations
- File paths and naming conventions
- Command-line examples
- Expected output examples
- Testing procedures
- Database verification steps
- Health check validations
- Learning Objectives: Clear goals for each lab
- Scenario: Real-world context for the lab
- Reflection Questions: Deep thinking prompts
- Key Concepts: Important terms and concepts covered
- Resources: Links to official documentation and articles
- Easy: Basic concepts and simple implementations
- Intermediate: More complex scenarios and custom implementations
- Advanced: Sophisticated patterns and production considerations
- Start with Lab 1 to understand basic actuator concepts
- Move to Lab 4 for basic transaction management
- Practice with the provided examples and exercises
- Complete Lab 2 for custom health indicators
- Implement Lab 3 for custom endpoints
- Experiment with different configurations and scenarios
- Master Lab 5 for advanced transaction concepts
- Combine actuator and transaction concepts
- Implement production-ready monitoring and transaction patterns
- Spring Boot 3.2.0: Latest stable version
- Spring Data JPA: Database access and ORM
- Spring Boot Actuator: Production monitoring and management
- H2 Database: In-memory database for development
- Gradle: Build tool and dependency management
- Java 17: Modern Java features and syntax
After completing this series, you will be able to:
- β Enable and configure Spring Boot Actuator
- β Access and interpret standard actuator endpoints
- β Create custom health indicators for application monitoring
- β Implement custom read-only and writable endpoints
- β Configure endpoint security and exposure
- β Monitor application health and performance
- β Integrate with monitoring and alerting systems
- β Understand ACID properties and transaction concepts
- β
Implement basic transaction management with
@Transactional
- β Handle transaction rollbacks and exceptions
- β Use different transaction propagation behaviors
- β Configure transaction isolation levels
- β Implement complex transaction scenarios
- β Debug and troubleshoot transaction issues
- Application health monitoring
- Performance metrics collection
- Custom business metrics
- Runtime configuration management
- Application state inspection
- Money transfer operations
- Account balance management
- Transaction logging and auditing
- Rollback mechanisms for failed operations
- Inventory management
- Order processing workflows
- Payment processing
- Notification systems
- Partial failure handling
- Port conflicts: Change
server.port
inapplication.properties
- Database connection: Ensure H2 console is enabled
- Actuator endpoints not visible: Check
management.endpoints.web.exposure.include
- Transaction rollbacks: Verify exception types and rollback rules
- Enable SQL logging:
spring.jpa.show-sql=true
- Use H2 console for database inspection
- Check actuator health endpoint for system status
- Monitor application logs for transaction details
This lab series is designed to be educational and practical. If you find issues or have suggestions for improvements:
- Check the existing issues
- Create detailed bug reports
- Suggest new lab topics or improvements
- Share your learning experiences
This educational content is provided for learning purposes. Feel free to use, modify, and distribute for educational use.
After completing this series, consider exploring:
- Distributed Transactions: Saga patterns, event sourcing
- Microservices Monitoring: Distributed tracing, centralized logging
- Performance Optimization: Connection pooling, caching strategies
- Security: Authentication, authorization, secure endpoints
- Cloud Deployment: Containerization, cloud-native patterns
Happy Learning! π
Start with Lab 1 and progress through the series to build a solid foundation in Spring Boot Actuator and Transaction Management.