Day 36 Today I worked on some core Spring Framework concepts through hands-on practice: • Lazy Loading • Primary Bean • getBean() by Type • getBean() by Name Lazy Loading – Bean is created only when it is requested instead of during application startup. Primary Bean – When multiple beans of the same type exist, the primary bean is chosen by default for dependency injection. getBean() by Type – Retrieves a bean from the Spring container using its class type. getBean() by Name – Retrieves a bean using the bean id or name defined in the configuration. Learning these concepts practically helped me understand how Spring manages beans inside the IoC container. #SpringFramework #Java #BackendDevelopment #Learning
Mastering Spring Framework: Lazy Loading, Primary Bean, and getBean() Methods
More Relevant Posts
-
Most beginners get confused with Dependency Injection in Spring Boot. Let me break it down simply Instead of creating objects manually inside a class, Spring Boot automatically provides (injects) the required objects. Without Dependency Injection: You create objects manually → tightly coupled code With Dependency Injection: Spring provides objects → loose coupling & better design In simple terms: Spring Boot = “I’ll give you what you need, you just focus on logic.” This makes applications: • Cleaner • Easier to maintain • More scalable Currently learning and applying these concepts step by step. #SpringBoot #Java #BackendDevelopment #LearningInPublic #FullStackDeveloper
To view or add a comment, sign in
-
-
🚀 What is Dependency Injection in Spring Boot? While learning Spring Boot, one concept that really improved my understanding of backend development was Dependency Injection (DI). At first, the name sounded complicated, but the idea is actually simple. 👉 Dependency Injection means letting Spring create and manage objects instead of creating them manually. Without Dependency Injection UserService userService = new UserService(); Here the class is responsible for creating the object itself, which creates tight coupling. With Dependency Injection in Spring Boot @Autowired private UserService userService; Now Spring automatically creates and injects the object when the application starts. Why is Dependency Injection important? ✔ Reduces tight coupling between classes ✔ Makes code easier to test ✔ Improves maintainability ✔ Helps build scalable applications This is one of the key concepts that makes Spring Boot powerful for backend development. #Java #SpringBoot #BackendDevelopment #LearningInPublic #Coding
To view or add a comment, sign in
-
-
Day 1 — Committing to consistency. When people say learning is about consistency, they mean it. So I’m starting a daily learning log — one topic, every day. Today’s work: project environment setup and the fundamentals behind Spring Boot. What I did today Set up the project skeleton, build tool, and run configuration. Read about the evolution of Java web frameworks and why Spring Boot became the go‑to choice. #DevJourney #SpringBoot #100DaysOfCode #LearningInPublic
To view or add a comment, sign in
-
-
🔗 Understanding @Autowired in Spring Boot While building my Spring Boot project, I explored how different components are connected without manually creating objects. 🔹 What is @Autowired? It is used for Dependency Injection, which allows Spring to automatically provide the required objects instead of creating them manually using "new". 💡 Why is it useful? It helps in writing cleaner and loosely coupled code, making applications easier to manage and scale. For example, instead of creating a service object inside a controller, Spring injects it automatically using @Autowired. Understanding this concept gave me a better idea of how Spring manages objects internally 💻 #SpringBoot #Java #DependencyInjection #BackendDevelopment #TechLearning
To view or add a comment, sign in
-
-
🚀 Understanding Dependency Injection in Spring Boot While learning Spring Boot, I explored one of the most important concepts — Dependency Injection (DI). 💡 In simple terms: Instead of creating objects manually, Spring automatically injects the required dependencies. 🔍 Why is it important? ✔️ Reduces tight coupling ✔️ Makes code more maintainable ✔️ Easier testing and scalability 📊 I created this simple visual to understand how Dependency Injection works in real applications. Learning step by step and building strong backend fundamentals 💻 Let’s connect and grow together 🤝 #SpringBoot #Java #BackendDevelopment #DependencyInjection #CodingJourney #LearnInPublic
To view or add a comment, sign in
-
-
💻 Understanding @RestController in Spring Boot While exploring Spring Boot, I worked on creating a simple REST API using @RestController. 🔹 What does @RestController do? It is used to handle HTTP requests and create REST APIs in a clean and simple way. It combines: ✔ @Controller ✔ @ResponseBody This means the data returned from methods is directly sent as a response (usually in JSON format), instead of rendering a view. 💡 Why is it useful? It reduces boilerplate code and makes API development much faster and more efficient ⚡ 🚀 Tried building a simple UserController with basic endpoints like GET and POST. Still exploring more about request mappings and how things work internally. #SpringBoot #Java #RestAPI #BackendDevelopment #TechLearning
To view or add a comment, sign in
-
-
Hello LinkedIn 👋🏻... 📌I'm Sharing my Spring Boot journey through handwritten notes These are my #SpringBoot notes organized to highlight clarity, structured workflow, and real-world application. A small step toward building backend systems that are easier to understand and maintain. #SpringBoot #Java #BackendDevelopment #RESTAPI #SoftwareDevelopment #TechNotes #learning
To view or add a comment, sign in
-
🚀 Spring Boot Learning Series – Day 3: REST APIs Built my first real API today 🔥 🔹 What is REST? Communication between frontend & backend using HTTP 🔹 Methods: GET | POST | PUT | DELETE 💻 Code: @RestController @RequestMapping("/api") public class ApiController { @GetMapping("/get") public String get() { return "GET"; } @PostMapping("/post") public String post() { return "POST"; } } 🎯 Key Learning: APIs are the backbone of modern applications ━━━━━━━━━━━━━━━━━━━ 📌 Next: Dependency Injection #SpringBoot #RESTAPI #Java #WebDevelopment
To view or add a comment, sign in
-
-
💡 The Magic Behind Spring: Annotations!!!!! When I first started learning Spring Framework, everything felt… complicated. XML configurations, long setups, and too much wiring. It felt like building a house by manually connecting every wire. Then I discovered Annotations and everything changed. 1. Suddenly, my code became smarter. 2. My configurations became cleaner. 3. And development became faster. Instead of writing pages of configuration, I could simply say: 👉 @Component – “Hey Spring, manage this class.” 👉 @Autowired – “Please inject the dependency for me.” 👉 @RestController – “This class handles web requests.” It felt like having a conversation with the framework instead of commanding it. Why are annotations so important? Because they: Reduce boilerplate code Improve readability Enable dependency injection effortlessly Make applications more scalable and maintainable 📌 In simple words: Annotations are the language through which developers communicate with Spring. And once you understand them, Spring doesn’t feel complex anymore it feels powerful. 🚀 Still learning, still exploring… but every small concept like this makes the journey exciting. #SpringBoot #Java #LearningJourney #BackendDevelopment #WomenInTech #knowledgeshare
To view or add a comment, sign in
-
-
🚀 Exploring #XMLConfiguration in #SpringFramework As part of my learning journey in the Spring Framework, today I explored how Spring Beans can be configured using XML. 📄 In XML configuration, we define beans inside a configuration file and the Spring Container creates and manages those objects automatically. 🧩 A typical bean definition looks like this: <bean id="orv" class="com.coders.Product"></bean> Here: id → unique name of the bean class → Fully Qualified Name (FQN) of the Java class 📦 I also learned how to load the configuration file using ApplicationContext: ApplicationContext context = new ClassPathXmlApplicationContext("config.xml"); 🔎 Additionally, I explored different ways of injecting values into beans: • Constructor Injection using <constructor-arg> • Setter Injection using <property> (p-namespace) Understanding these concepts helps in managing object creation and dependencies efficiently in Spring applications. Looking forward to learning more advanced concepts and building real-world backend applications with Spring and Spring Boot! 💻 #SpringFramework #Java #BackendDevelopment #SpringBoot #LearningJourney #SoftwareDevelopment
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development