Spring Boot β Bean and Its Lifecycle
π± Spring Boot β Bean and Its Lifecycle 1οΈβ£ What is a Bean? A Bean is a Java object that is created, managed, and destroyed by the Spring IoC…
π± Spring Boot β Bean and Its Lifecycle 1οΈβ£ What is a Bean? A Bean is a Java object that is created, managed, and destroyed by the Spring IoC…
1οΈβ£ What is Maven? Maven is a build automation and project management tool used primarily for Java and Spring Boot applications. π― Problems Maven Solves Build generation (compile, test,…
Project Setup & Layered Architecture π 1. Introduction to Spring Boot Spring Boot is a framework built on top of Spring Framework that simplifies application development, configuration, and deployment. π…
1οΈβ£ Servlet and Servlet Container πΉ What is a Servlet? A Servlet is a Java class that handles HTTP requests and generates HTTP responses. It acts as a bridge between…
What is Event-Driven Architecture (EDA)? In Event-Driven Architecture, services: Produce events when something happens Consume events asynchronously Do not wait for each other π Services are loosely coupled. π Example…
Why Distributed Transactions Are a Problem? In microservices: Each service has its own database Traditional 2PC (XA transactions) donβt scale well High latency & tight coupling π So we use…
Authentication vs Authorization Authentication β Who are you? (identity) Authorization β What can you access? (permissions) πΉ Challenge in Microservices Multiple services Stateless REST APIs Shared security logic Avoid session…
What is Service Discovery? In microservices, service instances: Scale up/down dynamically Change IPs frequently π Service Discovery helps services find each other dynamically without hard-coded URLs. πΉ Types of Service…
Problem Without Centralized Configuration In microservices: Each service has its own application.properties Environment changes (dev/qa/prod) require redeployment Configuration drift occurs Security risk (secrets in code) πΉ What is Spring Cloud…
What is Load Balancing in Microservices? Load balancing means distributing incoming requests across multiple instances of a service to: Improve performance Increase availability Avoid overloading a single instance π Example:Order…