Spring Boot

Spring MVC Basics

Spring MVC is the web framework in Spring Boot that follows the Model-View-Controller pattern: the Controller handles requests, the Model carries data, and the View renders the page. Every request first reaches the DispatcherServlet, which finds the right controller method, runs it, and then picks a view to render. It is used to build web […]

Spring MVC Basics Read More »

Spring Boot Web Development With MySQL

Spring Boot Web Development With MySQL covers how a Spring Boot web application connects to, manages, and interacts with a relational MySQL database. It bridges web layers (like REST APIs) with persistent storage by providing automated database connection pooling, query execution tools, data-to-object transformation, and multi-source data architectures. 1. Database Connectivity and SQL Operations Database

Spring Boot Web Development With MySQL Read More »

Multiple Bean Selection

When several beans implement the same interface, Spring cannot decide which one to inject and fails with a “NoUniqueBeanDefinitionException”. You resolve it with @Primary (the default choice), @Qualifier(“beanName”) (an explicit choice), or by injecting all the beans as a Map or List. It is used when one feature has several implementations, such as Email and

Multiple Bean Selection Read More »

Component Scanning

Component scanning is how Spring automatically discovers classes annotated with @Component (and its specializations) and registers them as beans, with no XML or manual @Bean needed. @SpringBootApplication includes @ComponentScan, which scans the package of the main class and all its sub-packages. It is used so you can just annotate a class and have it become

Component Scanning Read More »

Dependency Injection

Dependency Injection (DI) means a class does not create the objects it needs; Spring creates them and hands them in. Spring looks at the constructor, setter, or field, finds a matching bean in the container, and injects it automatically. It is used for loose coupling, easy swapping of implementations (for example Email vs SMS), and

Dependency Injection Read More »

Spring Beans and Dependency Injection

Spring Beans and Dependency Injection (DI) form the core foundation of the Spring Framework’s Inversion of Control (IoC) engine. Instead of classes creating and managing their own dependencies using the new keyword, the Spring IoC container handles object creation, wiring, lifecycle management, and destruction. This decouples application components, making them modular, reusable, and easy to

Spring Beans and Dependency Injection Read More »

Environment Profiles

Environment profiles let one application keep separate configurations for development, testing and production. Each profile has its own file, such as application-dev.properties and application-prod.properties. A property named spring.profiles.active decides which profile is loaded at startup. Settings that appear in both the common file and the profile file are overridden by the profile file. The same

Environment Profiles Read More »

Custom Configuration

Custom configuration means defining your own application-specific values (like college name or academic year) in application.properties instead of hard-coding them in Java. Spring Boot reads these values at startup and makes them available inside your classes. You can bind them to a Java class with @ConfigurationProperties, or read single values with @Value. Changing a value

Custom Configuration Read More »

YAML Configuration

YAML (application.yml) is a human-readable file for storing Spring Boot application settings in a hierarchical, indentation-based structure. Related settings such as server, database, and JPA are grouped under one parent key, so you don’t repeat prefixes. It supports maps, lists, and nested objects, and can hold separate settings for dev, test, and prod. The Student

YAML Configuration Read More »

Scroll to Top