<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mujuzi Moses </title>
    <description>The latest articles on DEV Community by Mujuzi Moses  (@iammujuzimoses).</description>
    <link>https://dev.to/iammujuzimoses</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4047712%2F948e3867-6c70-4e52-8f3b-ea5264b061a1.png</url>
      <title>DEV Community: Mujuzi Moses </title>
      <link>https://dev.to/iammujuzimoses</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iammujuzimoses"/>
    <language>en</language>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring Web (Spring MVC) Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Wed, 02 Sep 2026 10:00:21 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-web-spring-mvc-module-506g</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-web-spring-mvc-module-506g</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 10 — Spring Web (Spring MVC)&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DispatcherServlet&lt;/li&gt;
&lt;li&gt;Controllers&lt;/li&gt;
&lt;li&gt;Request Mapping&lt;/li&gt;
&lt;li&gt;Path Variables&lt;/li&gt;
&lt;li&gt;Request Parameters&lt;/li&gt;
&lt;li&gt;Request Body&lt;/li&gt;
&lt;li&gt;Response Body&lt;/li&gt;
&lt;li&gt;Model and View&lt;/li&gt;
&lt;li&gt;View Resolvers&lt;/li&gt;
&lt;li&gt;Exception Handling&lt;/li&gt;
&lt;li&gt;Request Scope&lt;/li&gt;
&lt;li&gt;Session Scope&lt;/li&gt;
&lt;li&gt;Application Scope&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the things I enjoyed about this module was understanding what actually happens when an HTTP request enters a Spring MVC application.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;DispatcherServlet&lt;/code&gt; acts as the front controller, receiving incoming requests and coordinating the request-handling process. Controllers then define how those requests should be handled using mappings such as &lt;code&gt;@GetMapping&lt;/code&gt; and &lt;code&gt;@PostMapping&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I also explored different ways of working with request data, including path variables, request parameters, and request bodies, as well as how Spring converts incoming data into Java objects.&lt;/p&gt;

&lt;p&gt;The view-related examples helped connect the pieces between a controller, a model, and a view. &lt;code&gt;ModelAndView&lt;/code&gt; can be used to return both model data and a logical view name, while &lt;code&gt;ViewResolver&lt;/code&gt; determines which actual view should be rendered.&lt;/p&gt;

&lt;p&gt;Exception handling was another important part of the module. Using mechanisms such as &lt;code&gt;@ExceptionHandler&lt;/code&gt; and &lt;code&gt;@ControllerAdvice&lt;/code&gt;, it becomes possible to keep error-handling logic organized instead of putting it directly into every controller.&lt;/p&gt;

&lt;p&gt;Finally, I explored Spring's web scopes - request, session, and application scope — and how the lifetime of a bean can be tied to the lifecycle of an HTTP request, user session, or web application.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to collect Spring annotations and APIs. I’m trying to understand how Spring works under the hood, how its features fit together, and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;https://gith.ub/dsAQrAU5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 GitLab: &lt;a href="https://gitlab.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 11 - Testing&lt;/strong&gt; - exploring how to test Spring applications, starting with unit testing and the Spring TestContext, followed by &lt;code&gt;@SpringBootTest&lt;/code&gt;, &lt;code&gt;@MockBean&lt;/code&gt;, &lt;code&gt;@TestConfiguration&lt;/code&gt;, and integration testing.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring MVC before, what’s one part of the request-handling process you think developers commonly misunderstand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #gitlab #learninginpublic #backend #softwareengineering #spring #springmvc
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring Boot Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Thu, 27 Aug 2026 08:50:15 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-boot-module-3g45</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-boot-module-3g45</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 9 — Spring Boot&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module focused on the foundations of Spring Boot and covered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SpringApplication&lt;/li&gt;
&lt;li&gt;Auto Configuration&lt;/li&gt;
&lt;li&gt;Starter Dependencies&lt;/li&gt;
&lt;li&gt;Configuration Properties&lt;/li&gt;
&lt;li&gt;Profiles&lt;/li&gt;
&lt;li&gt;CommandLineRunner&lt;/li&gt;
&lt;li&gt;Actuator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the things I enjoyed most about this module was seeing how much Spring Boot does behind the scenes while still allowing us to understand and control what is happening.&lt;/p&gt;

&lt;p&gt;I started with &lt;strong&gt;SpringApplication&lt;/strong&gt;, exploring how &lt;code&gt;SpringApplication.run()&lt;/code&gt; bootstraps a Spring Boot application and creates the application context.&lt;/p&gt;

&lt;p&gt;Then I explored &lt;strong&gt;Auto Configuration&lt;/strong&gt;, which showed how Spring Boot can automatically configure application infrastructure based on the dependencies available on the classpath.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starter Dependencies&lt;/strong&gt; were another important piece. Instead of manually adding and managing every dependency needed for a particular feature, Spring Boot starters provide convenient dependency groupings that bring the required libraries together.&lt;/p&gt;

&lt;p&gt;I also explored &lt;strong&gt;Configuration Properties&lt;/strong&gt;, which demonstrated how application configuration can be externalized rather than hard-coded into the application.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Profiles&lt;/strong&gt;, I looked at how Spring applications can use different configurations depending on the active environment, such as development, testing, or production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CommandLineRunner&lt;/strong&gt; introduced a simple way to execute code when the application starts, which is useful for initialization tasks and understanding the application startup lifecycle.&lt;/p&gt;

&lt;p&gt;Finally, &lt;strong&gt;Actuator&lt;/strong&gt; showed how Spring Boot applications can expose operational information such as health endpoints. Seeing &lt;code&gt;/actuator/health&lt;/code&gt; return an &lt;code&gt;UP&lt;/code&gt; status was a nice way to finish the module.&lt;/p&gt;

&lt;p&gt;What I’m enjoying about Spring Boot is that it isn't just about reducing configuration.&lt;/p&gt;

&lt;p&gt;It provides conventions and sensible defaults while still allowing developers to understand and customize the underlying Spring infrastructure.&lt;/p&gt;

&lt;p&gt;The goal of this project isn't just to collect Spring Boot annotations and APIs. I'm trying to understand what Spring is doing underneath the surface, how its features fit together, and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;https://gith.ub/dsAQrAU5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitLab:&lt;/strong&gt; &lt;a href="https://gitlab.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Spring Web (Spring MVC)&lt;/strong&gt; — exploring &lt;code&gt;DispatcherServlet&lt;/code&gt;, controllers, request mapping, request parameters, request bodies, views, exception handling, and request/session/application scopes.&lt;/p&gt;

&lt;p&gt;If you've worked with Spring Boot before, &lt;strong&gt;what Spring Boot feature made the biggest difference in your day-to-day development?&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #springboot #opensource #github #gitlab #learninginpublic #backend #softwareengineering #spring
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring Transactions Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 24 Aug 2026 08:54:17 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-transactions-module-3f8c</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-transactions-module-3f8c</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 8 — Transactions&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;@Transactional&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Transaction Propagation&lt;/li&gt;
&lt;li&gt;Isolation Levels&lt;/li&gt;
&lt;li&gt;Rollback Rules&lt;/li&gt;
&lt;li&gt;Programmatic Transactions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TransactionProxyFactoryBean&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the most interesting parts of this module was understanding what actually happens when Spring manages a transaction.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;@Transactional&lt;/code&gt; makes it possible to declaratively define transaction boundaries without having to manually begin, commit, or roll back transactions in application code.&lt;/p&gt;

&lt;p&gt;Transaction propagation introduced another important concept: what should happen when a transactional method calls another transactional method?&lt;/p&gt;

&lt;p&gt;I explored propagation behaviors such as &lt;code&gt;REQUIRED&lt;/code&gt; and &lt;code&gt;REQUIRES_NEW&lt;/code&gt;, and how they affect whether operations participate in the same transaction or run in an independent transaction.&lt;/p&gt;

&lt;p&gt;Isolation levels then showed another side of transaction management: how concurrent transactions interact with data and what kinds of visibility and consistency guarantees they provide.&lt;/p&gt;

&lt;p&gt;Rollback rules were another useful area to explore. A transaction does not necessarily roll back for every exception automatically, so understanding how Spring determines whether a transaction should be rolled back is important when designing transactional services.&lt;/p&gt;

&lt;p&gt;I also explored programmatic transactions, which provide more explicit control over transaction boundaries when declarative transaction management isn't the right fit.&lt;/p&gt;

&lt;p&gt;Finally, I looked at &lt;code&gt;TransactionProxyFactoryBean&lt;/code&gt;, an older Spring approach to applying transaction management through proxies. It was especially useful for understanding how Spring's transaction infrastructure evolved and how it connects to the proxy concepts explored in the previous AOP module.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to collect Spring annotations and APIs. I’m trying to understand how the Spring container works, how its features fit together, and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;githu.b/sbe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 GitLab: &lt;a href="https://gitlab.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;gitla.b/sbe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Spring JDBC&lt;/strong&gt; — continuing to explore how Spring works with databases and how its abstractions simplify database access.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring before, what part of Spring's transaction management do you think developers commonly misunderstand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #gitlab #learninginpublic #backend #softwareengineering #spring #transactions
&lt;/h1&gt;

</description>
      <category>opensource</category>
      <category>java</category>
      <category>spring</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring AOP Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Thu, 20 Aug 2026 10:02:15 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-aop-module-15oa</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-aop-module-15oa</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 7 — Spring AOP&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is AOP?&lt;/li&gt;
&lt;li&gt;JDK Dynamic Proxies&lt;/li&gt;
&lt;li&gt;CGLIB Proxies&lt;/li&gt;
&lt;li&gt;Creating an Aspect&lt;/li&gt;
&lt;li&gt;Before Advice&lt;/li&gt;
&lt;li&gt;After Advice&lt;/li&gt;
&lt;li&gt;After Returning Advice&lt;/li&gt;
&lt;li&gt;Around Advice&lt;/li&gt;
&lt;li&gt;Pointcuts&lt;/li&gt;
&lt;li&gt;Advice Ordering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the most interesting parts of this module was understanding that Spring AOP is built around &lt;strong&gt;proxies&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before getting into Spring's AOP abstractions, I explored JDK Dynamic Proxies and CGLIB proxies separately. That made it easier to understand what Spring is doing behind the scenes when it creates an AOP proxy around a Spring-managed bean.&lt;/p&gt;

&lt;p&gt;For example, instead of manually creating a proxy, Spring can use an aspect such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Aspect&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LoggingAspect&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Before&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"execution(* com.springbyexample.GreetingService.greet(..))"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;beforeGreeting&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Before greeting"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spring then uses the pointcut to determine which method calls should receive that behavior.&lt;/p&gt;

&lt;p&gt;That led into another important concept: &lt;strong&gt;advice&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I explored several different types of advice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@Before&lt;/code&gt; — runs before the target method.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@After&lt;/code&gt; — runs after the method invocation completes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@AfterReturning&lt;/code&gt; — runs when the method returns successfully.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@Around&lt;/code&gt; — surrounds the target invocation and gives the advice control over when the target executes through &lt;code&gt;ProceedingJoinPoint&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Around advice was particularly interesting because &lt;code&gt;proceed()&lt;/code&gt; determines whether the target method actually gets invoked.&lt;/p&gt;

&lt;p&gt;I also explored &lt;strong&gt;pointcuts&lt;/strong&gt;, which helped clarify an important distinction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pointcut
    ↓
Where should the advice apply?

Advice
    ↓
What should happen?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Before&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"execution(* com.springbyexample.GreetingService.greet(..))"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;uses the pointcut to tell Spring which method should be intercepted.&lt;/p&gt;

&lt;p&gt;Finally, I looked at &lt;strong&gt;advice ordering&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When multiple aspects apply to the same method, &lt;code&gt;@Order&lt;/code&gt; can be used to control their precedence. Lower order values have higher precedence, and the ordering becomes especially interesting when looking at how &lt;code&gt;@Before&lt;/code&gt; and &lt;code&gt;@After&lt;/code&gt; advice execute around the target method.&lt;/p&gt;

&lt;p&gt;One of the things I wanted to understand through these examples was not just &lt;em&gt;how to write an aspect&lt;/em&gt;, but what is actually happening when a method call goes through Spring AOP:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Caller
   ↓
Spring AOP Proxy
   ↓
Pointcut matching
   ↓
Ordered Advice
   ↓
Target Method
   ↓
Ordered Advice
   ↓
Return value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That connects nicely with the earlier proxy examples and makes Spring AOP feel much less like "magic."&lt;/p&gt;

&lt;p&gt;The goal of &lt;strong&gt;spring-by-example&lt;/strong&gt; isn't just to collect Spring annotations and APIs.&lt;/p&gt;

&lt;p&gt;I'm trying to understand how the Spring container works, how its features fit together, and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://gitlab.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Spring Transactions&lt;/strong&gt; — continuing the journey by exploring another important part of the Spring ecosystem.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring AOP before, what concept do you think is the most difficult for developers to understand: &lt;strong&gt;proxies, pointcuts, advice, or advice ordering?&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #gitlab #learninginpublic #backend #softwareengineering #spring #aop
&lt;/h1&gt;

</description>
      <category>spring</category>
      <category>java</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring Events Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Sun, 16 Aug 2026 15:57:40 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-events-module-184l</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-events-module-184l</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 6 — Events&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Publishing Events&lt;/li&gt;
&lt;li&gt;Listening for Events&lt;/li&gt;
&lt;li&gt;Custom Events&lt;/li&gt;
&lt;li&gt;Transactional Events&lt;/li&gt;
&lt;li&gt;Async Events&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I’ve really enjoyed about this module is seeing how Spring’s event system can help decouple different parts of an application.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;ApplicationEventPublisher&lt;/code&gt; allows one component to publish an event without needing to know which components will respond to it. &lt;code&gt;@EventListener&lt;/code&gt; then provides a simple way for other components to react to those events.&lt;/p&gt;

&lt;p&gt;I also explored custom events, which made it possible to model application-specific events such as an order being created.&lt;/p&gt;

&lt;p&gt;Transactional events introduced another interesting concept: controlling when an event listener should run in relation to a transaction. With &lt;code&gt;@TransactionalEventListener&lt;/code&gt;, event handling can be tied to transaction phases such as after a successful commit.&lt;/p&gt;

&lt;p&gt;Finally, &lt;code&gt;@Async&lt;/code&gt; showed how event listeners can be processed asynchronously, allowing the publisher to continue without waiting for the listener to finish.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to collect Spring annotations and APIs. I’m trying to understand how the Spring container works, how its features fit together, and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;githu.b/mujuzimoses&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Spring AOP&lt;/strong&gt; — exploring Aspect-Oriented Programming, proxies, aspects, advice, pointcuts, and how Spring applies cross-cutting concerns.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring before, what’s one part of Spring’s event system you think developers commonly misunderstand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering #spring #events
&lt;/h1&gt;

</description>
      <category>spring</category>
      <category>java</category>
      <category>opensource</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Bean Lifecycle Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Thu, 13 Aug 2026 12:00:30 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-bean-lifecycle-module-48kh</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-bean-lifecycle-module-48kh</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called &lt;strong&gt;spring-by-example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed &lt;strong&gt;Module 5 — Bean Lifecycle&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;InitializingBean&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;DisposableBean&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;@PostConstruct&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;@PreDestroy&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;BeanPostProcessor&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;BeanFactoryPostProcessor&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;SmartLifecycle&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I’ve really enjoyed about this module is seeing how these concepts fit into different stages of the Spring container lifecycle.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;@PostConstruct&lt;/code&gt; and &lt;code&gt;InitializingBean&lt;/code&gt; help with bean initialization, while &lt;code&gt;@PreDestroy&lt;/code&gt; and &lt;code&gt;DisposableBean&lt;/code&gt; provide ways to perform cleanup.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;BeanPostProcessor&lt;/code&gt; introduced another interesting part of Spring: processing bean instances before and after initialization. &lt;code&gt;BeanFactoryPostProcessor&lt;/code&gt; took that a step further by working with bean definitions before the actual bean instances are created.&lt;/p&gt;

&lt;p&gt;And with &lt;code&gt;SmartLifecycle&lt;/code&gt;, I explored how Spring can coordinate the startup and shutdown of components that have an active running state.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to collect Spring annotations and interfaces. I’m trying to understand how the Spring container works and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;githu.b/mujuzimoses&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Events&lt;/strong&gt; — exploring how Spring components can communicate through application events, including custom events, transactional events, and asynchronous events.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring before, what’s one part of the Spring bean lifecycle you think developers commonly misunderstand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering #spring #beanlifecycl
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>opensource</category>
      <category>spring</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Dependency Injection Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 10 Aug 2026 11:28:16 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-dependency-injection-module-4ehg</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-dependency-injection-module-4ehg</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about many of the tutorials I found.&lt;/p&gt;

&lt;p&gt;They often showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started a project called spring-by-example.&lt;/p&gt;

&lt;p&gt;The idea is simple: instead of building one large application, I’m creating a collection of small, focused examples where each example explores a specific Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;I’m happy to say that I’ve now completed Module 4 — Dependency Injection. 🎉&lt;/p&gt;

&lt;p&gt;The module covers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a class="mentioned-user" href="https://dev.to/primary"&gt;@primary&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;@Qualifier&lt;/li&gt;
&lt;li&gt;Collection Injection&lt;/li&gt;
&lt;li&gt;@Order&lt;/li&gt;
&lt;li&gt;Map Injection&lt;/li&gt;
&lt;li&gt;ObjectProvider&lt;/li&gt;
&lt;li&gt;Optional Dependencies&lt;/li&gt;
&lt;li&gt;Circular Dependencies&lt;/li&gt;
&lt;li&gt;Bean Aliases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I’ve really enjoyed about this module is seeing how these concepts build on each other.&lt;/p&gt;

&lt;p&gt;For example, &lt;a class="mentioned-user" href="https://dev.to/primary"&gt;@primary&lt;/a&gt; and @Qualifier help resolve multiple candidates, while collection and map injection let us work with multiple beans. ObjectProvider introduces more flexible bean retrieval, and examples like circular dependencies show what can go wrong when the dependency graph isn’t designed carefully.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to collect Spring annotations. I’m trying to understand how the Spring container works and why these features exist, one concept at a time.&lt;/p&gt;

&lt;p&gt;The project is open source, and I’m continuing to build it as I learn:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example" rel="noopener noreferrer"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but completing another module feels like a good milestone. 🚀&lt;/p&gt;

&lt;p&gt;Next up: Bean Lifecycle — understanding how Spring creates, initializes, and destroys beans.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring before, what’s one dependency injection concept you think developers commonly misunderstand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering #dependencyinjection
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>opensource</category>
      <category>spring</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Configuration Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Wed, 05 Aug 2026 11:30:29 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-configuration-module-1eco</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-configuration-module-1eco</guid>
      <description>&lt;p&gt;When I started building spring-by-example, my goal was simple:&lt;/p&gt;

&lt;p&gt;Learn Spring by creating small, focused, runnable examples that explain not just how something works, but why it works.&lt;/p&gt;

&lt;p&gt;Since then, the project has grown steadily, and I’ve just completed the Configuration module.&lt;/p&gt;

&lt;p&gt;So far, the repository includes examples covering:&lt;/p&gt;

&lt;p&gt;✅ Fundamentals&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring Beans&lt;/li&gt;
&lt;li&gt;Dependency Injection&lt;/li&gt;
&lt;li&gt;Constructor Injection&lt;/li&gt;
&lt;li&gt;Setter Injection&lt;/li&gt;
&lt;li&gt;Field Injection&lt;/li&gt;
&lt;li&gt;Choosing an Injection Strategy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Bean Scopes (Core)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Singleton Scope&lt;/li&gt;
&lt;li&gt;Prototype Scope&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ Configuration&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;@Configuration&lt;/li&gt;
&lt;li&gt;&lt;a class="mentioned-user" href="https://dev.to/bean"&gt;@bean&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;@Component&lt;/li&gt;
&lt;li&gt;@Service&lt;/li&gt;
&lt;li&gt;@Repository&lt;/li&gt;
&lt;li&gt;@Controller&lt;/li&gt;
&lt;li&gt;@ComponentScan&lt;/li&gt;
&lt;li&gt;&lt;a class="mentioned-user" href="https://dev.to/import"&gt;@import&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;@ImportResource&lt;/li&gt;
&lt;li&gt;XML Configuration&lt;/li&gt;
&lt;li&gt;Java Configuration&lt;/li&gt;
&lt;li&gt;Mixing XML and Java Configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each example is intentionally small, runnable, and documented so you can focus on understanding one concept at a time without the noise of a large application.&lt;/p&gt;

&lt;p&gt;Next up is Dependency Injection, where I’ll be exploring topics like &lt;a class="mentioned-user" href="https://dev.to/primary"&gt;@primary&lt;/a&gt;, @Qualifier, collection injection, ObjectProvider, and more.&lt;/p&gt;

&lt;p&gt;Building this repository has been a great way to deepen my own understanding while creating something I hope will be useful to others learning Spring.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring, which concept was your biggest “aha!” moment—or which one took the longest to truly understand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>opensource</category>
      <category>spring</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Sun, 26 Jul 2026 09:32:09 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-jkg</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-jkg</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed something about the tutorials I found.&lt;/p&gt;

&lt;p&gt;Many showed how to use a feature, but not always why it worked or when you should choose one approach over another.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I decided to start a project called spring-by-example.&lt;/p&gt;

&lt;p&gt;Instead of creating one large application, I’m building a collection of small, focused examples—each one exploring a single Spring concept with clear explanations, tests, and documentation.&lt;/p&gt;

&lt;p&gt;So far I’ve worked through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring Beans&lt;/li&gt;
&lt;li&gt;Dependency Injection&lt;/li&gt;
&lt;li&gt;Constructor Injection&lt;/li&gt;
&lt;li&gt;Setter Injection&lt;/li&gt;
&lt;li&gt;Field Injection&lt;/li&gt;
&lt;li&gt;Choosing an Injection Strategy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m sharing the journey here as I continue learning. My hope is that, over time, this grows into a resource that helps other developers understand Spring one concept at a time.&lt;/p&gt;

&lt;p&gt;If you’ve learned Spring, what concept took you the longest to fully understand?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering
&lt;/h1&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>learning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
