<?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%2F587b42d5-249c-4822-8f51-79620adb4972.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 V2: Completing Module 07 - Spring Batch</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Sun, 08 Nov 2026 10:57:33 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-07-spring-batch-kof</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-07-spring-batch-kof</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 how the different pieces fitted together in a real application.&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 07 - Spring Batch&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module took me from the fundamentals of batch processing to more advanced topics such as job execution metadata, restartability, fault tolerance, and testing.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Jobs and Steps&lt;/li&gt;
&lt;li&gt;Job Parameters&lt;/li&gt;
&lt;li&gt;Item Readers&lt;/li&gt;
&lt;li&gt;Item Processors&lt;/li&gt;
&lt;li&gt;Item Writers&lt;/li&gt;
&lt;li&gt;Chunk-Oriented Processing&lt;/li&gt;
&lt;li&gt;Tasklet Processing&lt;/li&gt;
&lt;li&gt;Job Execution and Metadata&lt;/li&gt;
&lt;li&gt;Job Restartability&lt;/li&gt;
&lt;li&gt;Skip and Retry&lt;/li&gt;
&lt;li&gt;Batch Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I particularly enjoyed about this module was understanding how Spring Batch breaks a batch process into smaller, manageable components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jobs and Steps
&lt;/h2&gt;

&lt;p&gt;I started with jobs and steps.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Job&lt;/strong&gt; represents the overall batch process, while &lt;strong&gt;Steps&lt;/strong&gt; define the individual operations that make up that process.&lt;/p&gt;

&lt;p&gt;From there, I explored job parameters and how they allow values to be passed into a job at runtime.&lt;/p&gt;

&lt;p&gt;This also helped me understand how Spring Batch identifies job instances and distinguishes between identifying and non-identifying parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Item Readers, Processors, and Writers
&lt;/h2&gt;

&lt;p&gt;Next came item readers, processors, and writers.&lt;/p&gt;

&lt;p&gt;These are the core components of chunk-oriented processing.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;ItemReader&lt;/code&gt; reads input data, an &lt;code&gt;ItemProcessor&lt;/code&gt; transforms or filters it, and an &lt;code&gt;ItemWriter&lt;/code&gt; writes the resulting items.&lt;/p&gt;

&lt;p&gt;For example, a simple processor can transform an order description into uppercase:&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;@Override&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;ProcessedOrder&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt; &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;ProcessedOrder&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;(),&lt;/span&gt;
            &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;toUpperCase&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Locale&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ROOT&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;h2&gt;
  
  
  Chunk-Oriented Processing
&lt;/h2&gt;

&lt;p&gt;Chunk-oriented processing introduced another important concept.&lt;/p&gt;

&lt;p&gt;Rather than processing and writing one item at a time, Spring Batch can process items in chunks.&lt;/p&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="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ChunkOrientedStepBuilder&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Order&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;ProcessedOrder&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;(&lt;/span&gt;
        &lt;span class="s"&gt;"processOrdersStep"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;jobRepository&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
        &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;reader&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orderItemReader&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;processor&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orderItemProcessor&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;writer&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;orderItemWriter&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a chunk size of three, Spring Batch processes items in groups of three before writing them.&lt;/p&gt;

&lt;p&gt;This helped me understand transaction boundaries and how chunk size affects the execution of a batch step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tasklet Processing
&lt;/h2&gt;

&lt;p&gt;I also explored tasklet processing.&lt;/p&gt;

&lt;p&gt;Unlike chunk-oriented processing, a tasklet is useful for a single operation or a small, self-contained task, such as archiving records, performing cleanup, or executing a database operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Job Execution and Metadata
&lt;/h2&gt;

&lt;p&gt;Job execution and metadata were another important part of the module.&lt;/p&gt;

&lt;p&gt;I explored how Spring Batch stores information about job instances, job executions, and step executions using a JDBC-backed &lt;code&gt;JobRepository&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This made it possible to expose execution information through REST endpoints and understand what happened during a batch run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Restartability
&lt;/h2&gt;

&lt;p&gt;Restartability was particularly interesting.&lt;/p&gt;

&lt;p&gt;A batch job can fail partway through execution, but that doesn't necessarily mean everything needs to start again.&lt;/p&gt;

&lt;p&gt;Spring Batch can use persisted execution metadata and execution contexts to restore state and continue processing from where the job left off.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skip and Retry
&lt;/h2&gt;

&lt;p&gt;I also explored skip and retry policies.&lt;/p&gt;

&lt;p&gt;Not every processing failure should necessarily stop an entire batch job.&lt;/p&gt;

&lt;p&gt;Some records may be invalid and can be skipped, while temporary failures may be worth retrying.&lt;/p&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="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;faultTolerant&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;skipPolicy&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;skipPolicy&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;retryPolicy&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;retryPolicy&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This demonstrated how Spring Batch can handle different failure scenarios while allowing the overall job to complete when appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Batch Testing
&lt;/h2&gt;

&lt;p&gt;Finally, I finished the module with batch testing.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;@SpringBatchTest&lt;/code&gt;, &lt;code&gt;JobOperatorTestUtils&lt;/code&gt;, and Spring Boot testing support, I explored how to test individual components, execute jobs and steps, verify execution metadata, and test step-scoped components.&lt;/p&gt;

&lt;p&gt;One important lesson from this was that testing a batch application involves more than checking whether the final output is correct.&lt;/p&gt;

&lt;p&gt;It is also important to verify execution status, read and write counts, commit counts, job parameters, and the behavior of individual steps.&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-v2" 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-v2" 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 &lt;strong&gt;Module 07 - Spring Batch&lt;/strong&gt; feels like another important milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 08 - Spring Integration&lt;/strong&gt; continuing to explore the Spring ecosystem through small, focused, runnable examples.&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you've worked with Spring Batch before, &lt;strong&gt;what do you find most useful in your batch applications - chunk processing, restartability, skip and retry, or something else?&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example V2: Completing Module 06 - Capstone Application</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 02 Nov 2026 12:55:52 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-06-capstone-application-25eh</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-06-capstone-application-25eh</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 06 - Capstone Application&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module is a little different from the previous ones. Rather than focusing on individual Spring features, it brings together concepts explored throughout the project and demonstrates how they work together in complete applications.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Application Design and Architecture&lt;/li&gt;
&lt;li&gt;Spring Boot&lt;/li&gt;
&lt;li&gt;Spring Data and Persistence&lt;/li&gt;
&lt;li&gt;REST APIs&lt;/li&gt;
&lt;li&gt;Spring Security&lt;/li&gt;
&lt;li&gt;Transaction Management&lt;/li&gt;
&lt;li&gt;Modular Architecture with Spring Modulith&lt;/li&gt;
&lt;li&gt;Application Testing&lt;/li&gt;
&lt;li&gt;Integration Between Spring Technologies&lt;/li&gt;
&lt;li&gt;End-to-End Application Verification&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the most interesting parts of this module was exploring how to structure a Spring Boot application into well-defined modules.&lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;Spring Modulith&lt;/strong&gt;, I explored how to organize an application around business capabilities, establish clear module boundaries, manage dependencies, and communicate between modules using application events.&lt;/p&gt;

&lt;p&gt;This helped reinforce an important architectural idea: even when building a monolithic application, you don't have to organize everything into one large, tightly coupled codebase.&lt;/p&gt;

&lt;p&gt;I also explored how to test applications built with these technologies.&lt;/p&gt;

&lt;p&gt;Testing individual components is important, but it is equally important to understand how those components behave when working together inside a running Spring application.&lt;/p&gt;

&lt;p&gt;That led to the next example: integrating multiple Spring technologies.&lt;/p&gt;

&lt;p&gt;For this example, I built an Order Management application using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring Boot&lt;/li&gt;
&lt;li&gt;Spring Data JPA&lt;/li&gt;
&lt;li&gt;Spring Web&lt;/li&gt;
&lt;li&gt;Spring Security&lt;/li&gt;
&lt;li&gt;Spring Modulith&lt;/li&gt;
&lt;li&gt;Transaction Management&lt;/li&gt;
&lt;li&gt;Application Events&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The application is organized into four business modules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Catalog&lt;/strong&gt; - manages product information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inventory&lt;/strong&gt; - manages product stock and reservations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ordering&lt;/strong&gt; - handles customer orders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit&lt;/strong&gt; - records important application events.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the workflows I particularly enjoyed implementing was order placement.&lt;/p&gt;

&lt;p&gt;When a customer places an order, the application needs to coordinate several operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieve the requested product.&lt;/li&gt;
&lt;li&gt;Reserve the required inventory.&lt;/li&gt;
&lt;li&gt;Create and persist the order.&lt;/li&gt;
&lt;li&gt;Publish an application event.&lt;/li&gt;
&lt;li&gt;Record the resulting audit entry.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These operations also need to respect transaction boundaries.&lt;/p&gt;

&lt;p&gt;For example, if there isn't enough inventory, the order should not be persisted and the inventory reservation should be rolled back.&lt;/p&gt;

&lt;p&gt;I also explored how to use &lt;code&gt;@TransactionalEventListener&lt;/code&gt; with &lt;code&gt;AFTER_COMMIT&lt;/code&gt; to process an order event after the original transaction has successfully committed.&lt;/p&gt;

&lt;p&gt;The Audit module then records the event in a separate transaction using &lt;code&gt;REQUIRES_NEW&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This was a useful way to see how Spring transactions, application events, and modular architecture can work together in a realistic business workflow.&lt;/p&gt;

&lt;p&gt;Finally, I completed the module with &lt;strong&gt;End-to-End Application Verification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This example focuses on verifying a running Spring application through its externally exposed HTTP endpoints rather than testing its internal implementation directly.&lt;/p&gt;

&lt;p&gt;Using Java's HTTP Client, Jackson, and JUnit, I built tests that communicate with the Order Management application as an external client would.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Retrieving publicly accessible products.&lt;/li&gt;
&lt;li&gt;Authentication and authorization.&lt;/li&gt;
&lt;li&gt;Customer and administrator access restrictions.&lt;/li&gt;
&lt;li&gt;Placing orders and retrieving order history.&lt;/li&gt;
&lt;li&gt;Verifying inventory updates.&lt;/li&gt;
&lt;li&gt;Preventing customers from accessing another customer's orders.&lt;/li&gt;
&lt;li&gt;Verifying audit entries after successful order placement.&lt;/li&gt;
&lt;li&gt;Handling invalid quantities, insufficient inventory, and nonexistent products.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also added a dedicated GitHub Actions workflow that starts the Order Management application, waits for it to become available, and executes the end-to-end verification tests.&lt;/p&gt;

&lt;p&gt;An important distinction I explored here is that end-to-end tests depend on a running application. They are therefore executed separately from the regular Maven build, which allows contributors to run the standard build without having to start the dependent application.&lt;/p&gt;

&lt;p&gt;What I particularly enjoyed about this final module was seeing how the individual concepts explored throughout Spring by Example V2 come together.&lt;/p&gt;

&lt;p&gt;Modular architecture helps organize the application. Spring Data JPA handles persistence. Spring Security protects endpoints. Transactions maintain consistency. Application events support communication between modules. Testing and end-to-end verification help establish confidence that everything works together.&lt;/p&gt;

&lt;p&gt;The goal isn't just to know how to use individual Spring annotations or dependencies.&lt;/p&gt;

&lt;p&gt;The bigger goal is to understand how these technologies complement one another when building real applications.&lt;/p&gt;

&lt;p&gt;The project is open source, and I've been building it one focused example at a time:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example-v2" 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-v2" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Module 06 - Capstone Application&lt;/strong&gt; complete, another important milestone in Spring by Example V2 has been reached. 🚀&lt;/p&gt;

&lt;p&gt;Six modules completed, with each one building on the knowledge gained from the previous modules.&lt;/p&gt;

&lt;p&gt;There's still more to explore, but I'm enjoying the process of turning what I learn into practical, runnable examples that others can learn from too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you've built applications with Spring, how do you approach modular architecture, transaction management, and testing workflows that involve multiple Spring technologies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'd love to hear about your experiences.&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #springboot #springmodulith #springdata #springsecurity #softwareengineering #opensource #github #learninginpublic #backend
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example V2: Completing Module 05 - Spring Testing</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 26 Oct 2026 14:20:15 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-05-spring-testing-3mdn</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-05-spring-testing-3mdn</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, what was happening behind the scenes, or how to test it properly.&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 V2&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 05 - Spring Testing&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module explored how to test Spring applications at different levels, from loading application contexts and testing individual web layers to verifying security behavior, database interactions, and integration with external resources.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Spring TestContext Framework&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@SpringJUnitConfig&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@SpringBootTest&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Spring MVC Testing&lt;/li&gt;
&lt;li&gt;Spring Test Slices&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MockMvc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Transaction Testing&lt;/li&gt;
&lt;li&gt;Spring Security Testing&lt;/li&gt;
&lt;li&gt;Integration Testing&lt;/li&gt;
&lt;li&gt;Testcontainers&lt;/li&gt;
&lt;li&gt;Application Context Testing&lt;/li&gt;
&lt;li&gt;Context Caching&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I particularly enjoyed about this module was understanding that &lt;strong&gt;testing a Spring application isn't just about writing assertions. It's also about knowing what you're testing, which parts of the application you're loading, and how to make tests reliable and maintainable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I started with the Spring TestContext Framework, exploring how Spring integrates with testing frameworks such as &lt;code&gt;JUnit&lt;/code&gt; Jupiter to manage application contexts, dependency injection, and the test lifecycle.&lt;/p&gt;

&lt;p&gt;From there, I explored &lt;code&gt;@SpringJUnitConfig&lt;/code&gt; and &lt;code&gt;@SpringBootTest&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These annotations helped me understand the difference between testing with a specific Spring configuration and loading a full Spring Boot application context.&lt;/p&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;@SpringJUnitConfig&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;AppConfig&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;GreetingServiceTest&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Autowired&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;GreetingService&lt;/span&gt; &lt;span class="n"&gt;greetingService&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@Test&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;returnsGreeting&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;assertEquals&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, Moses!"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;greetingService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;greet&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Moses"&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;The important idea is that Spring can provide the configured dependencies directly to the test, allowing us to verify application behavior within a Spring-managed environment.&lt;/p&gt;

&lt;p&gt;Next came Spring MVC testing and test slices.&lt;/p&gt;

&lt;p&gt;I explored how &lt;code&gt;@WebMvcTest&lt;/code&gt; allows us to focus on the web layer without loading the entire application context.&lt;/p&gt;

&lt;p&gt;Combined with &lt;code&gt;MockMvc&lt;/code&gt;, this makes it possible to test HTTP requests, controller behavior, response status codes, and returned content without starting a real web server.&lt;/p&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;@WebMvcTest&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;GreetingController&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;GreetingControllerTest&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

    &lt;span class="nd"&gt;@Autowired&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;MockMvc&lt;/span&gt; &lt;span class="n"&gt;mockMvc&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@MockitoBean&lt;/span&gt;
    &lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;GreetingService&lt;/span&gt; &lt;span class="n"&gt;greetingService&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@Test&lt;/span&gt;
    &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;returnsGreeting&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;when&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;greetingService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;greet&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Moses"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;thenReturn&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, Moses!"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;mockMvc&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;perform&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/greetings"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;param&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Moses"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;andExpect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;isOk&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;andExpect&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;string&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, Moses!"&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;This approach helped me appreciate the value of testing a specific application layer while replacing its dependencies with controlled test doubles.&lt;/p&gt;

&lt;p&gt;I also explored transaction testing.&lt;/p&gt;

&lt;p&gt;Transactions are important in application development because they help maintain data consistency when multiple operations must succeed or fail together.&lt;/p&gt;

&lt;p&gt;Testing transactional behavior helps verify that database changes behave as expected, including rollback scenarios where appropriate.&lt;/p&gt;

&lt;p&gt;Spring Security testing was another important part of the module.&lt;/p&gt;

&lt;p&gt;Security behavior needs to be tested just as carefully as business logic. It's not enough for an endpoint to return the expected response; we also need to verify that authentication and authorization rules are enforced correctly.&lt;/p&gt;

&lt;p&gt;I then moved into integration testing.&lt;/p&gt;

&lt;p&gt;Unlike tests that isolate a particular layer, integration tests help verify that multiple application components work together as expected.&lt;/p&gt;

&lt;p&gt;This led to Testcontainers, which introduces another useful approach: running tests against real instances of dependencies, such as databases, using containers.&lt;/p&gt;

&lt;p&gt;That distinction matters because an in-memory database or a mocked dependency may not reproduce every behavior of the actual system used in production.&lt;/p&gt;

&lt;p&gt;I also explored application context testing and finished the module with &lt;strong&gt;context caching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was particularly interesting because it connected test correctness with test performance.&lt;/p&gt;

&lt;p&gt;Creating a Spring application context can involve configuration processing, bean creation, and dependency injection. Repeating that work unnecessarily can make a test suite slow.&lt;/p&gt;

&lt;p&gt;Spring's TestContext Framework addresses this by caching and reusing compatible application contexts across tests.&lt;/p&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="nc"&gt;ApplicationContext&lt;/span&gt; &lt;span class="n"&gt;firstContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
        &lt;span class="n"&gt;loadContext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;FirstContextTest&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;ApplicationContext&lt;/span&gt; &lt;span class="n"&gt;secondContext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
        &lt;span class="n"&gt;loadContext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SecondContextTest&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="n"&gt;assertSame&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;firstContext&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;secondContext&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When both test classes use compatible configuration metadata, Spring can reuse the same application context.&lt;/p&gt;

&lt;p&gt;I also explored &lt;code&gt;@DirtiesContext&lt;/code&gt;, which tells Spring that a context should no longer be reused from the cache.&lt;/p&gt;

&lt;p&gt;This helped me understand an important balance: context caching improves performance, but tests must still be designed with proper isolation in mind.&lt;/p&gt;

&lt;p&gt;A shared application context doesn't automatically reset the state of every singleton bean between tests.&lt;/p&gt;

&lt;p&gt;Looking back, this module reinforced an important lesson for me: &lt;strong&gt;good tests don't just tell us whether something works; they help us understand where it works, how its dependencies behave, and whether the application can be trusted when its components interact.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The goal isn't simply to learn how to write:&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;@Test&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;shouldWork&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bigger goal is to understand the different testing strategies available in Spring, when to use each one, and how to build confidence in application behavior without making the test suite unnecessarily slow or complicated.&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-v2" 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-v2" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Five modules completed, and each one has been another opportunity to explore the Spring ecosystem in more depth. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 06 - Capstone Application&lt;/strong&gt; - bringing together concepts from the preceding modules to build a cohesive, production-oriented application.&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you've worked with Spring testing before, &lt;strong&gt;which testing approach do you find most valuable in your day-to-day development - &lt;code&gt;@WebMvcTest&lt;/code&gt;, &lt;code&gt;@SpringBootTest&lt;/code&gt;, integration testing, &lt;code&gt;Testcontainers&lt;/code&gt;, or something else?&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #springboot #testing #junit #testcontainers #opensource #github #learninginpublic #backend #softwareengineering
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example V2: Completing Module 04 - Spring Modulith</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 19 Oct 2026 09:04:45 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-04-spring-modulith-5ane</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-04-spring-modulith-5ane</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 how different parts of an application fit together.&lt;/p&gt;

&lt;p&gt;I learn best by building things and documenting what I discover, so I started &lt;strong&gt;Spring by Example V2&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 04 - Spring Modulith&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module helped me explore modular monolith architecture and understand how Spring Modulith supports the development of well-structured Spring applications.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Application Modules&lt;/li&gt;
&lt;li&gt;Module Boundaries&lt;/li&gt;
&lt;li&gt;Module Dependencies&lt;/li&gt;
&lt;li&gt;Application Events&lt;/li&gt;
&lt;li&gt;Event Externalization&lt;/li&gt;
&lt;li&gt;Module Verification&lt;/li&gt;
&lt;li&gt;Module Documentation&lt;/li&gt;
&lt;li&gt;Module Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I enjoyed about this module was learning how to organize an application into modules with clear responsibilities instead of allowing everything to become tightly coupled.&lt;/p&gt;

&lt;p&gt;Module boundaries help define which parts of an application belong together and how they interact. Spring Modulith also provides tools for verifying module structure and detecting unwanted dependencies.&lt;/p&gt;

&lt;p&gt;Application events introduced another useful concept: components can communicate through events without needing to depend directly on the components that handle them.&lt;/p&gt;

&lt;p&gt;I also explored module verification, documentation, and testing, which help make modular architecture more than just a package-organization decision.&lt;/p&gt;

&lt;p&gt;The goal isn’t simply to create separate packages. It’s to understand how to establish meaningful boundaries, manage dependencies, and keep an application maintainable as it grows.&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-v2" 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-v2" 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 &lt;strong&gt;Module 04 — Spring Modulith&lt;/strong&gt; feels like another important milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 05 - Spring Testing&lt;/strong&gt;, where I’ll explore the Spring TestContext Framework, &lt;code&gt;@SpringJUnitConfig&lt;/code&gt;, &lt;code&gt;@SpringBootTest&lt;/code&gt;, test slices, MockMvc, integration testing, and more.&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring Modulith before, &lt;strong&gt;what has helped you most when designing modular Spring applications?&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example V2: Completing Module 03 - Reactive Spring</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Tue, 13 Oct 2026 10:37:55 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-03-reactive-spring-3f2e</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-03-reactive-spring-3f2e</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-v2&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 03 - Reactive Spring!&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;p&gt;This module was an opportunity to explore a different way of building applications with Spring. Rather than focusing only on traditional blocking operations, I explored reactive programming, asynchronous data processing, and how Spring WebFlux works with Project Reactor.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Project Reactor&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Mono&lt;/code&gt; and &lt;code&gt;Flux&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reactive Pipelines&lt;/li&gt;
&lt;li&gt;Backpressure&lt;/li&gt;
&lt;li&gt;Spring WebFlux&lt;/li&gt;
&lt;li&gt;Reactive Controllers&lt;/li&gt;
&lt;li&gt;Reactive Clients&lt;/li&gt;
&lt;li&gt;Reactive Data Access&lt;/li&gt;
&lt;li&gt;Reactive Error Handling&lt;/li&gt;
&lt;li&gt;Reactive Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Understanding Mono and Flux
&lt;/h2&gt;

&lt;p&gt;One of the first things I explored was the difference between &lt;code&gt;Mono&lt;/code&gt; and &lt;code&gt;Flux&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In Project Reactor, these are two fundamental types for representing asynchronous sequences of data.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;Mono&lt;/code&gt; represents a sequence that produces at most one item, while a &lt;code&gt;Flux&lt;/code&gt; represents a sequence that can produce zero to many items.&lt;/p&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="nc"&gt;Mono&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Mono&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;just&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, Spring!"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;greetings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;just&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"from"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Reactive Spring"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These types don't simply represent values or collections. They represent publishers that can participate in a reactive pipeline.&lt;/p&gt;

&lt;p&gt;That distinction helped me understand why reactive code often looks different from traditional Java code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Reactive Pipelines
&lt;/h2&gt;

&lt;p&gt;After learning the basics, I explored how reactive pipelines are composed.&lt;/p&gt;

&lt;p&gt;Instead of processing data through a sequence of blocking method calls, Reactor allows operations to be chained together using operators such as &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, and &lt;code&gt;flatMap&lt;/code&gt;.&lt;/p&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="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;just&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Moses"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"John"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Mary"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

&lt;span class="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;filteredNames&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;map&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;String:&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;toUpperCase&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the pipeline filters the names and transforms the remaining values.&lt;/p&gt;

&lt;p&gt;Exploring these operators helped me understand how data flows through a reactive sequence and how individual operations can be composed into larger processing pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Backpressure
&lt;/h2&gt;

&lt;p&gt;Backpressure was another important concept in this module.&lt;/p&gt;

&lt;p&gt;A publisher may produce data faster than a subscriber can process it. Backpressure provides a mechanism through which demand can be communicated so that data processing can be better coordinated.&lt;/p&gt;

&lt;p&gt;This introduced me to the relationship between publishers, subscribers, and demand in reactive streams.&lt;/p&gt;

&lt;p&gt;It also helped me understand that reactive programming isn't simply about using asynchronous APIs. It involves thinking carefully about how data is produced, consumed, and managed throughout a pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing Reactive Programming into Spring WebFlux
&lt;/h2&gt;

&lt;p&gt;Once I had explored the Reactor fundamentals, I moved into Spring WebFlux.&lt;/p&gt;

&lt;p&gt;I worked through reactive controllers, reactive clients, and reactive data access to understand how reactive programming fits into a Spring application.&lt;/p&gt;

&lt;p&gt;One of the important distinctions I explored was that returning a &lt;code&gt;Mono&lt;/code&gt; or &lt;code&gt;Flux&lt;/code&gt; from a controller doesn't automatically make every operation in the application non-blocking.&lt;/p&gt;

&lt;p&gt;The underlying operations matter too.&lt;/p&gt;

&lt;p&gt;For example, a reactive controller that calls a blocking database driver can still introduce blocking work into the request-processing flow.&lt;/p&gt;

&lt;p&gt;Understanding this distinction helped me appreciate why WebFlux works best when the application uses compatible non-blocking components throughout the relevant execution path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reactive Error Handling
&lt;/h2&gt;

&lt;p&gt;Errors are an inevitable part of application development, and reactive pipelines introduce their own ways of handling them.&lt;/p&gt;

&lt;p&gt;I explored how errors propagate through a pipeline and how Reactor operators can be used to recover from certain failures.&lt;/p&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="nc"&gt;Mono&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Mono&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;IllegalStateException&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Something went wrong"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;onErrorReturn&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Fallback value"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of allowing the error to terminate the sequence without recovery, &lt;code&gt;onErrorReturn&lt;/code&gt; provides a fallback value.&lt;/p&gt;

&lt;p&gt;This helped me understand error handling as part of the reactive pipeline rather than treating it as something separate from the data-processing flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Reactive Applications
&lt;/h2&gt;

&lt;p&gt;One of my favourite parts of this module was reactive testing.&lt;/p&gt;

&lt;p&gt;Testing reactive code requires more than checking the final value returned by a method. Depending on the behavior being tested, we may also need to verify emitted items, completion signals, errors, timing, and demand.&lt;/p&gt;

&lt;p&gt;I explored &lt;code&gt;StepVerifier&lt;/code&gt; from Project Reactor's testing utilities.&lt;/p&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="nc"&gt;StepVerifier&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Flux&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;just&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Spring"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"WebFlux"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Reactor"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;expectNext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Spring"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;expectNext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"WebFlux"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;expectNext&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Reactor"&lt;/span&gt;&lt;span class="o"&gt;).&lt;/span&gt;&lt;span class="na"&gt;verifyComplete&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This test verifies the sequence of emitted values and confirms that the publisher completes successfully.&lt;/p&gt;

&lt;p&gt;I also explored:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;WebTestClient&lt;/code&gt;&lt;/strong&gt; for testing reactive web endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Virtual-time testing&lt;/strong&gt; for time-dependent reactive sequences without waiting for real delays.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error testing&lt;/strong&gt; for verifying how publishers behave when failures occur.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backpressure testing&lt;/strong&gt; for checking how publishers respond to subscriber demand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These examples helped me see that reactive behavior can be tested explicitly rather than relying only on assumptions about how the pipeline should work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Took Away from This Module
&lt;/h2&gt;

&lt;p&gt;The biggest lesson from this module is that &lt;strong&gt;reactive programming is not just about replacing return types with &lt;code&gt;Mono&lt;/code&gt; and &lt;code&gt;Flux&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's about understanding asynchronous sequences, composing operations, handling errors, managing demand, and choosing the right components for the execution model.&lt;/p&gt;

&lt;p&gt;I also learned to pay more attention to the difference between writing reactive code and building an application that is genuinely non-blocking across its relevant processing path.&lt;/p&gt;

&lt;p&gt;As with the previous modules, the goal wasn't to build one large application that uses every feature.&lt;/p&gt;

&lt;p&gt;It was to create small, focused examples that make each concept easier to understand, test, and revisit later.&lt;/p&gt;

&lt;p&gt;With Spring Data and Reactive Spring now complete, &lt;strong&gt;spring-by-example-v2&lt;/strong&gt; continues to grow as a practical learning resource covering different parts of the Spring ecosystem.&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-v2" 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-v2" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Completing &lt;strong&gt;Module 03 - Reactive Spring&lt;/strong&gt; feels like another important milestone in this journey. 🚀&lt;/p&gt;

&lt;p&gt;There are still more Spring concepts to explore, more examples to build, and more things to learn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One focused example at a time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've worked with reactive programming in Spring, &lt;strong&gt;what was the biggest learning curve for you - understanding Reactor, handling backpressure, testing reactive pipelines, or knowing when to choose WebFlux over Spring MVC?&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Java #SpringFramework #SpringBoot #ProjectReactor #SpringWebFlux #ReactiveProgramming #OpenSource #LearningInPublic #BackendDevelopment #SoftwareEngineering
&lt;/h1&gt;

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example V2: Completing Module 02 -Spring Data</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Wed, 07 Oct 2026 13:58:37 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-02-spring-data-12kf</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-v2-completing-module-02-spring-data-12kf</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 02 - Spring Data&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module took me from the fundamentals of Spring Data repositories to more advanced ways of querying, mapping, and testing data.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Spring Data Repositories&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CrudRepository&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Query Methods&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@Query&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Entity Mapping&lt;/li&gt;
&lt;li&gt;Entity Relationships&lt;/li&gt;
&lt;li&gt;Transactions&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Specifications&lt;/li&gt;
&lt;li&gt;Projections&lt;/li&gt;
&lt;li&gt;Auditing&lt;/li&gt;
&lt;li&gt;Custom Repositories&lt;/li&gt;
&lt;li&gt;Database Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One thing I really enjoyed about this module was seeing how much Spring Data can handle while still allowing you to take control when you need to.&lt;/p&gt;

&lt;p&gt;I started with repository abstractions and &lt;code&gt;CrudRepository&lt;/code&gt;, then explored how Spring Data can derive queries directly from method names.&lt;/p&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="nc"&gt;List&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;findByAgeGreaterThan&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's no SQL or JPQL in the method itself, but Spring Data can interpret the method name and create the appropriate query.&lt;/p&gt;

&lt;p&gt;From there, I explored &lt;code&gt;@Query&lt;/code&gt; for cases where defining the query explicitly makes more sense.&lt;/p&gt;

&lt;p&gt;Then came entity mapping and relationships.&lt;/p&gt;

&lt;p&gt;Working with &lt;code&gt;@OneToOne&lt;/code&gt;, &lt;code&gt;@OneToMany&lt;/code&gt;, &lt;code&gt;@ManyToOne&lt;/code&gt;, and &lt;code&gt;@ManyToMany&lt;/code&gt; helped me understand how object relationships are represented in the persistence layer rather than simply treating entities as isolated classes.&lt;/p&gt;

&lt;p&gt;Transactions were another important part of the module.&lt;/p&gt;

&lt;p&gt;I explored how multiple database changes can be grouped into a single transactional operation and, more importantly, how a failure partway through an operation can cause those changes to be rolled back.&lt;/p&gt;

&lt;p&gt;Pagination and Specifications then showed two different ways of building more flexible queries.&lt;/p&gt;

&lt;p&gt;With Specifications, I could compose criteria dynamically:&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="nc"&gt;Specification&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Person&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;specification&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
        &lt;span class="nc"&gt;PersonSpecifications&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;nameContains&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Jan"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
                &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;and&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;PersonSpecifications&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ageGreaterThan&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Projections introduced another useful idea: sometimes you don't need the entire entity.&lt;/p&gt;

&lt;p&gt;Instead, you can retrieve only the data required by a particular use case.&lt;/p&gt;

&lt;p&gt;I also explored auditing with annotations 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;@CreatedDate&lt;/span&gt;
&lt;span class="nd"&gt;@LastModifiedDate&lt;/span&gt;
&lt;span class="nd"&gt;@CreatedBy&lt;/span&gt;
&lt;span class="nd"&gt;@LastModifiedBy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This helped me understand how Spring Data can automatically track information about when an entity was created or modified and who performed the operation.&lt;/p&gt;

&lt;p&gt;Custom repositories were another interesting step.&lt;/p&gt;

&lt;p&gt;Instead of relying entirely on derived queries and &lt;code&gt;@Query&lt;/code&gt;, I explored repository fragments and how a custom implementation can be composed with a Spring Data repository.&lt;/p&gt;

&lt;p&gt;Finally, I finished the module with database testing.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;@DataJpaTest&lt;/code&gt;, H2, and &lt;code&gt;@Sql&lt;/code&gt;, I explored how repository behavior can be tested against an actual database rather than relying only on mocks.&lt;/p&gt;

&lt;p&gt;That distinction was particularly useful because a mocked repository cannot tell you whether a JPQL query, entity mapping, or derived query actually works against the database.&lt;/p&gt;

&lt;p&gt;The goal isn’t just to learn how to write:&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="nc"&gt;PersonRepository&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bigger goal is to understand what Spring Data is doing for me, where its conventions help, and when I should take more control.&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-v2" 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-v2" 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 &lt;strong&gt;Module 02 - Spring Data&lt;/strong&gt; feels like another important milestone. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 03 - Reactive Spring&lt;/strong&gt; - moving from traditional blocking application development into reactive programming with Spring.&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring Data before, &lt;strong&gt;which feature do you find most useful in your day-to-day development - derived queries, Specifications, projections, transactions, or something else?&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Starting Spring by Example V2: Completing Module 01 -Spring Security</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Wed, 30 Sep 2026 10:38:53 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/starting-spring-by-example-v2-completing-module-01-spring-security-21pc</link>
      <guid>https://dev.to/iammujuzimoses/starting-spring-by-example-v2-completing-module-01-spring-security-21pc</guid>
      <description>&lt;p&gt;When I started learning Spring, I noticed that many tutorials showed &lt;strong&gt;how to use Spring features&lt;/strong&gt;, but didn't always explain how the different pieces fit together.&lt;/p&gt;

&lt;p&gt;I learn best by building and documenting what I discover, so I started &lt;strong&gt;Spring by Example&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The idea is simple: build small, focused examples that explore specific Spring concepts through code, tests, and documentation.&lt;/p&gt;

&lt;p&gt;After completing the first version of the project, I decided to start a new chapter: &lt;strong&gt;Spring by Example V2&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why V2?
&lt;/h2&gt;

&lt;p&gt;V2 keeps the same philosophy but expands the scope.&lt;/p&gt;

&lt;p&gt;The goal is to explore the &lt;strong&gt;modern Spring ecosystem&lt;/strong&gt; through small but extensive examples, covering areas such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spring Security&lt;/li&gt;
&lt;li&gt;Spring Data&lt;/li&gt;
&lt;li&gt;Reactive Spring&lt;/li&gt;
&lt;li&gt;Spring Modulith&lt;/li&gt;
&lt;li&gt;Spring Testing&lt;/li&gt;
&lt;li&gt;Capstone Application&lt;/li&gt;
&lt;li&gt;Spring Batch&lt;/li&gt;
&lt;li&gt;Spring Integration&lt;/li&gt;
&lt;li&gt;Spring Cloud&lt;/li&gt;
&lt;li&gt;Spring AI&lt;/li&gt;
&lt;li&gt;GraalVM Native&lt;/li&gt;
&lt;li&gt;Kotlin&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Small examples. Extensive coverage.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And I'm happy to say that &lt;strong&gt;Module 01 - Spring Security is now complete!&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Module 01 - Spring Security
&lt;/h2&gt;

&lt;p&gt;The module contains focused examples covering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basic Spring Security&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SecurityFilterChain&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UserDetailsService&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Password Encoding&lt;/li&gt;
&lt;li&gt;Authorization&lt;/li&gt;
&lt;li&gt;&lt;code&gt;SecurityContext&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Method Security&lt;/li&gt;
&lt;li&gt;CSRF Protection&lt;/li&gt;
&lt;li&gt;Session Management&lt;/li&gt;
&lt;li&gt;OAuth2 Login&lt;/li&gt;
&lt;li&gt;JWT Authentication&lt;/li&gt;
&lt;li&gt;Spring Security Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the biggest things I wanted to understand was how these pieces fit together.&lt;/p&gt;

&lt;p&gt;A simplified view looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP Request
     ↓
Security Filter Chain
     ↓
Authentication
     ↓
Authorization
     ↓
SecurityContext
     ↓
Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal wasn’t simply to memorize Spring Security annotations.&lt;/p&gt;

&lt;p&gt;It was to understand what each component does, where it fits, and how the pieces work together.&lt;/p&gt;

&lt;p&gt;That’s the approach I want to continue throughout V2.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s Next?
&lt;/h2&gt;

&lt;p&gt;With Spring Security complete, Module 02 - Spring Data is next.&lt;/p&gt;

&lt;p&gt;I’ll be exploring repositories, entity mapping, queries, pagination, specifications, auditing, projections, transactions, and custom repository implementations.&lt;/p&gt;

&lt;p&gt;The project is open source:&lt;/p&gt;

&lt;p&gt;🔗 GitHub: &lt;a href="https://github.com/IamMujuziMoses/spring-by-example-v2" 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-v2" rel="noopener noreferrer"&gt;https://gitl.ab/gfDEyGH3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring Security before, what part helped you understand it better?&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the OpenMRS Examples Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Wed, 23 Sep 2026 11:58:45 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-openmrs-examples-module-2f68</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-openmrs-examples-module-2f68</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 what was happening behind the scenes or how the different pieces of the framework worked together.&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 14 - OpenMRS Examples&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;But this milestone is a little more significant than completing another module.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Module 14 is the final module and final example of Spring by Example V1.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That means &lt;strong&gt;V1 of spring-by-example is now complete.&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  From Learning Spring to Studying Real-World Code
&lt;/h2&gt;

&lt;p&gt;This module was different from the previous ones because it moved away from studying Spring only through isolated examples and focused on how Spring concepts are applied in a &lt;strong&gt;real-world, open-source application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For this module, I used &lt;strong&gt;OpenMRS&lt;/strong&gt; as the real-world reference.&lt;/p&gt;

&lt;p&gt;OpenMRS is an open-source electronic medical record platform, and its codebase provided a much more realistic environment for exploring how Spring is used in a large application.&lt;/p&gt;

&lt;p&gt;Instead of simply asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How does this Spring feature work?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wanted to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How is this Spring feature actually used in a real application?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why was it implemented this way?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The goal of this module was not to reproduce the entire OpenMRS codebase.&lt;/p&gt;

&lt;p&gt;Instead, I created focused examples based on patterns and concepts found in OpenMRS, while keeping each example small enough to understand independently.&lt;/p&gt;

&lt;p&gt;The module explored areas such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service Registration&lt;/li&gt;
&lt;li&gt;Module Loading&lt;/li&gt;
&lt;li&gt;XML to Java Configuration&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OpenmrsBeanRegistrar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ServiceContext&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;AOP in OpenMRS&lt;/li&gt;
&lt;li&gt;Transaction Management&lt;/li&gt;
&lt;li&gt;Custom Spring Profiles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the things I found particularly valuable was seeing how the concepts from the previous modules connect when they're no longer isolated examples.&lt;/p&gt;

&lt;p&gt;For example, after learning about dependency injection, bean definitions, &lt;code&gt;BeanPostProcessor&lt;/code&gt;, transactions, and AOP proxies, it's one thing to understand each concept individually.&lt;/p&gt;

&lt;p&gt;It's another thing to encounter them together in a real application and understand &lt;strong&gt;why they are there and how they interact&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That was one of the main goals of this module.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Journey Through V1
&lt;/h2&gt;

&lt;p&gt;The progression of &lt;strong&gt;Spring by Example V1&lt;/strong&gt; now looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Spring Core
     │
     ▼
Dependency Injection
     │
     ▼
Bean Lifecycle
     │
     ▼
Events
     │
     ▼
AOP
     │
     ▼
Transactions
     │
     ▼
Spring Boot
     │
     ▼
Spring MVC
     │
     ▼
Testing
     │
     ▼
Advanced Spring
     │
     ▼
Spring Internals
     │
     ▼
OpenMRS Examples
     │
     ▼
   V1 DONE 🎉
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looking back at the progression, each module added another layer of understanding.&lt;/p&gt;

&lt;p&gt;I started with the fundamentals of Spring and gradually moved into dependency injection, bean lifecycle, events, AOP, transactions, Spring Boot, Spring MVC, testing, and more advanced Spring concepts.&lt;/p&gt;

&lt;p&gt;Then I went deeper into &lt;strong&gt;Spring Internals&lt;/strong&gt; to understand what was happening behind many of those features.&lt;/p&gt;

&lt;p&gt;Finally, &lt;strong&gt;OpenMRS Examples&lt;/strong&gt; brought those ideas into the context of a real-world application.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Took Away
&lt;/h2&gt;

&lt;p&gt;One of the biggest lessons from this journey is that understanding a framework isn't only about knowing its annotations and APIs.&lt;/p&gt;

&lt;p&gt;It's also about understanding how those pieces are used together to solve problems in a larger system.&lt;/p&gt;

&lt;p&gt;A simple annotation such as &lt;code&gt;@Autowired&lt;/code&gt; or &lt;code&gt;@Transactional&lt;/code&gt; can look straightforward when used in a small example.&lt;/p&gt;

&lt;p&gt;In a real application, however, it can be connected to configuration, proxies, bean lifecycle processing, transactions, service layers, persistence, testing, and many other parts of the system.&lt;/p&gt;

&lt;p&gt;Looking at these interactions made the concepts from the earlier modules feel much more concrete.&lt;/p&gt;

&lt;p&gt;The goal of the project was never to simply collect Spring annotations and interfaces.&lt;/p&gt;

&lt;p&gt;I wanted to understand &lt;strong&gt;how Spring works, why these features exist, and how the different pieces fit together&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Building small examples made the concepts easier to explore.&lt;/p&gt;

&lt;p&gt;Studying Spring's internals helped me understand what was happening underneath.&lt;/p&gt;

&lt;p&gt;And studying OpenMRS helped me see how those concepts can come together in a much larger application.&lt;/p&gt;

&lt;h2&gt;
  
  
  V1 Is Complete
&lt;/h2&gt;

&lt;p&gt;After all the modules, examples, tests, documentation, and experiments, &lt;strong&gt;Spring by Example V1 is officially complete.&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;p&gt;This isn't the end of the project.&lt;/p&gt;

&lt;p&gt;It's the end of &lt;strong&gt;V1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The project started as a way for me to learn Spring by building small examples instead of simply reading about the framework.&lt;/p&gt;

&lt;p&gt;Over time, it grew into a structured journey through different areas of the Spring ecosystem.&lt;/p&gt;

&lt;p&gt;And now I have a complete V1 that I can look back on as a record of what I learned.&lt;/p&gt;

&lt;p&gt;The next stage will be about deciding what &lt;strong&gt;Spring by Example V2&lt;/strong&gt; should look like and where to take the project from here.&lt;/p&gt;

&lt;p&gt;For now, though, I'm taking a moment to appreciate reaching this milestone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14 modules.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One focused example at a time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring by Example V1 — complete.&lt;/strong&gt; 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source
&lt;/h2&gt;

&lt;p&gt;The project is open source, and the complete V1 is available here:&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;🔗 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;Completing &lt;strong&gt;Module 14 - OpenMRS Examples&lt;/strong&gt; helped me connect those concepts to a real-world application.&lt;/p&gt;

&lt;p&gt;And completing Module 14 means something even bigger:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The final example of Spring by Example V1 is complete.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There’s still a long way to go, but reaching this milestone feels like an important point in the journey. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spring by Example V1 — DONE.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, let's see what V2 brings.&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Spring Internals Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Fri, 18 Sep 2026 12:31:13 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-internals-module-1fcg</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-internals-module-1fcg</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 what was happening behind the scenes or how the different pieces of the framework worked together.&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 13 - Spring Internals&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module was particularly interesting because it went beyond using Spring features and focused on understanding &lt;strong&gt;what happens behind the scenes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of simply writing &lt;code&gt;@Autowired&lt;/code&gt;, &lt;code&gt;@Transactional&lt;/code&gt;, or &lt;code&gt;@Component&lt;/code&gt; and letting Spring handle everything, I wanted to understand what Spring is actually doing with those annotations and how the different pieces of the container work together.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;How Beans Are Registered&lt;/li&gt;
&lt;li&gt;How Dependency Injection Works&lt;/li&gt;
&lt;li&gt;How Component Scanning Works&lt;/li&gt;
&lt;li&gt;How &lt;code&gt;@Autowired&lt;/code&gt; Works&lt;/li&gt;
&lt;li&gt;How &lt;code&gt;@Transactional&lt;/code&gt; Works&lt;/li&gt;
&lt;li&gt;How AOP Proxies Are Created&lt;/li&gt;
&lt;li&gt;How Bean Post Processors Work&lt;/li&gt;
&lt;li&gt;Understanding &lt;code&gt;DefaultListableBeanFactory&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Understanding &lt;code&gt;ConfigurationClassPostProcessor&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the first things I explored was &lt;strong&gt;how beans are registered&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I already knew that Spring manages beans, but looking at &lt;code&gt;BeanDefinition&lt;/code&gt; and &lt;code&gt;DefaultListableBeanFactory&lt;/code&gt; helped me understand an important distinction: &lt;strong&gt;registering a bean definition is not the same thing as creating the bean itself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Spring can first work with metadata describing a bean and later use that metadata to create and manage the actual object.&lt;/p&gt;

&lt;p&gt;That led naturally into &lt;strong&gt;dependency injection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of looking at dependency injection only from the perspective of annotations, I explored concepts such as &lt;code&gt;DependencyDescriptor&lt;/code&gt;, &lt;code&gt;MethodParameter&lt;/code&gt;, and &lt;code&gt;resolveDependency()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This helped me see dependency injection as a process of identifying an injection point, resolving the required dependency, and obtaining the appropriate bean from the container.&lt;/p&gt;

&lt;p&gt;Then I explored &lt;strong&gt;component scanning&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;@Component&lt;/code&gt; is something I've done many times, but looking at &lt;code&gt;ClassPathBeanDefinitionScanner&lt;/code&gt; made the process much clearer.&lt;/p&gt;

&lt;p&gt;A class annotated with &lt;code&gt;@Component&lt;/code&gt; doesn't magically become a Spring bean. Spring has to discover it during scanning, create a corresponding &lt;code&gt;BeanDefinition&lt;/code&gt;, and register that definition with the container.&lt;/p&gt;

&lt;p&gt;Then came &lt;strong&gt;&lt;code&gt;@Autowired&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;One of the most useful lessons here was understanding that &lt;code&gt;@Autowired&lt;/code&gt; itself doesn't perform the injection.&lt;/p&gt;

&lt;p&gt;It provides metadata that &lt;code&gt;AutowiredAnnotationBeanPostProcessor&lt;/code&gt; detects and processes.&lt;/p&gt;

&lt;p&gt;I also explored &lt;strong&gt;&lt;code&gt;@Transactional&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Rather than hiding transaction management behind Spring's higher-level configuration, I worked directly with &lt;code&gt;TransactionInterceptor&lt;/code&gt;, &lt;code&gt;TransactionAttributeSource&lt;/code&gt;, &lt;code&gt;AnnotationTransactionAttributeSource&lt;/code&gt;, and &lt;code&gt;PlatformTransactionManager&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Another particularly interesting part was &lt;strong&gt;AOP proxy creation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I used &lt;code&gt;ProxyFactory&lt;/code&gt; and &lt;code&gt;MethodInterceptor&lt;/code&gt; to see how a proxy can sit between the caller and the target object.&lt;/p&gt;

&lt;p&gt;Then I looked at &lt;strong&gt;BeanPostProcessor&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was another important piece of the puzzle because it showed how Spring can intercept and modify bean instances during their lifecycle.&lt;/p&gt;

&lt;p&gt;I also explored how a post processor can return the original bean or even replace it with another object.&lt;/p&gt;

&lt;p&gt;After working with all these individual mechanisms, I reached &lt;strong&gt;&lt;code&gt;DefaultListableBeanFactory&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This was probably one of the most important pieces for putting everything together.&lt;/p&gt;

&lt;p&gt;It helped me see why the bean factory is so central to Spring's internals.&lt;/p&gt;

&lt;p&gt;It brings together responsibilities around bean definitions, bean lookup, dependency resolution, singleton management, and bean creation.&lt;/p&gt;

&lt;p&gt;Finally, I explored &lt;strong&gt;&lt;code&gt;ConfigurationClassPostProcessor&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This connected many of the concepts from earlier examples.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@Configuration&lt;/code&gt;, &lt;code&gt;@Bean&lt;/code&gt;, &lt;code&gt;@ComponentScan&lt;/code&gt;, and &lt;code&gt;@Import&lt;/code&gt; are all configuration metadata that Spring needs to process.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ConfigurationClassPostProcessor&lt;/code&gt; participates in turning that configuration metadata into bean definitions that can ultimately be managed by the bean factory.&lt;/p&gt;

&lt;p&gt;The bigger picture started to look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Configuration Metadata
        │
        ▼
ConfigurationClassPostProcessor
        │
        ▼
BeanDefinitions
        │
        ▼
DefaultListableBeanFactory
        │
        ▼
Dependency Resolution
        │
        ▼
Bean Creation
        │
        ▼
BeanPostProcessors
        │
        ├── @Autowired
        └── AOP-related processing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Of course, this is a simplified model of Spring's internals, but having this mental model makes the framework feel much less like magic.&lt;/p&gt;

&lt;p&gt;And I think that's what made this module particularly valuable.&lt;/p&gt;

&lt;p&gt;The goal wasn't just to learn more Spring classes or memorize internal APIs.&lt;/p&gt;

&lt;p&gt;It was to understand the machinery underneath the features I've already been using.&lt;/p&gt;

&lt;p&gt;Instead of thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Spring does this."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I can now start asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Which part of Spring does this, and at what stage of the container lifecycle?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That shift in perspective is probably the biggest thing I'm taking away from this module.&lt;/p&gt;

&lt;p&gt;After completing modules covering Spring Core, dependency injection, bean lifecycle, events, AOP, transactions, Spring Boot, Spring MVC, testing, Advanced Spring, and now Spring Internals, the project continues to grow into something much bigger than I originally imagined.&lt;/p&gt;

&lt;p&gt;The goal still isn't to simply collect Spring annotations and interfaces.&lt;/p&gt;

&lt;p&gt;I'm trying to understand how Spring works, why these features exist, and how the different pieces of the framework fit together - one focused example 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;🔗 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;🔗 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;There’s still a long way to go, but completing &lt;strong&gt;Module 13 - Spring Internals&lt;/strong&gt; feels like another important milestone in this learning journey. 🚀&lt;/p&gt;

&lt;p&gt;And now comes the next stage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up: Module 14 - OpenMRS Examples.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This time, instead of focusing only on isolated Spring concepts, I'll be looking at how these concepts are actually applied in a real-world project.&lt;/p&gt;

&lt;p&gt;I'm especially looking forward to this module because it brings everything closer to the kind of code found in a real production system.&lt;/p&gt;

&lt;p&gt;One focused example at a time. 🚀&lt;/p&gt;

&lt;p&gt;If you've worked with Spring internals before, what's one part of the Spring container that helped you understand the framework better?&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>spring</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🚀 Building Spring by Example: Completing the Advanced Spring Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Tue, 15 Sep 2026 08:16:00 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-advanced-spring-module-2868</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-advanced-spring-module-2868</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 12 - Advanced Spring&lt;/strong&gt;. 🎉&lt;/p&gt;

&lt;p&gt;This module was a particularly interesting one because it moved beyond the higher-level features I had been using and gave me a closer look at some of the abstractions and extension points that make Spring work.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;BeanFactory&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ApplicationContext&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;FactoryBean&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;BeanDefinition&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;BeanDefinitionRegistry&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ImportSelector&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DeferredImportSelector&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ImportBeanDefinitionRegistrar&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Environment&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Property Sources&lt;/li&gt;
&lt;li&gt;Resource Loading&lt;/li&gt;
&lt;li&gt;&lt;code&gt;MessageSource&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ConversionService&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Validation&lt;/li&gt;
&lt;li&gt;Spring Expression Language (SpEL)&lt;/li&gt;
&lt;li&gt;Method Injection&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@Lookup&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the things I really enjoyed about this module was seeing how much of Spring's behavior is built around the &lt;strong&gt;application context, bean definitions, and the container itself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;BeanDefinition&lt;/code&gt; helped me understand that Spring doesn't immediately need an object instance to know how a bean should be created. Instead, it can work with metadata describing the bean.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;BeanDefinitionRegistry&lt;/code&gt; then showed how those definitions can be registered and managed programmatically.&lt;/p&gt;

&lt;p&gt;The configuration-related examples went even deeper. With &lt;code&gt;ImportSelector&lt;/code&gt;, &lt;code&gt;DeferredImportSelector&lt;/code&gt;, and &lt;code&gt;ImportBeanDefinitionRegistrar&lt;/code&gt;, I explored different ways Spring can dynamically select configuration or register bean definitions during application context processing.&lt;/p&gt;

&lt;p&gt;I also explored the &lt;code&gt;Environment&lt;/code&gt; and property sources, which helped connect Spring's environment abstraction with how configuration values can be provided and resolved from different sources.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Resource&lt;/code&gt; abstraction and &lt;code&gt;MessageSource&lt;/code&gt; introduced another side of Spring: providing consistent APIs for accessing resources and resolving localized messages.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;ConversionService&lt;/code&gt; and Spring validation, I explored how Spring provides reusable infrastructure for type conversion and object validation rather than requiring every application to implement these concerns independently.&lt;/p&gt;

&lt;p&gt;Then came &lt;strong&gt;SpEL - Spring Expression Language&lt;/strong&gt; - which was a great example of how Spring provides its own expression engine for evaluating values, properties, variables, and expressions.&lt;/p&gt;

&lt;p&gt;Finally, I explored &lt;strong&gt;Method Injection&lt;/strong&gt; and &lt;code&gt;@Lookup&lt;/code&gt;, including the interesting singleton/prototype problem where a singleton bean needs to obtain a new prototype instance whenever a method is called.&lt;/p&gt;

&lt;p&gt;What made this module especially meaningful is that it wasn't just about learning more Spring APIs. It gave me a better understanding of the machinery underneath the features I've already been using.&lt;/p&gt;

&lt;p&gt;And there's another milestone worth mentioning: &lt;strong&gt;SpEL was my 100th example in the project.&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;p&gt;After building examples across Spring Core, dependency injection, bean lifecycle, events, AOP, transactions, Spring Boot, Spring MVC, testing, and now Advanced Spring, reaching 100 examples feels like a significant milestone in this learning journey.&lt;/p&gt;

&lt;p&gt;The goal still isn't to simply collect Spring annotations and interfaces.&lt;/p&gt;

&lt;p&gt;I'm trying to understand how Spring works, why these features exist, and how the different pieces of the framework fit together - one focused example 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;🔗 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;🔗 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;There’s still a long way to go, but completing &lt;strong&gt;Module 12 - Advanced Spring&lt;/strong&gt; and reaching 100 examples feels like a milestone worth celebrating. 🚀&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next up:&lt;/strong&gt; continuing with the next stage of the project and exploring more Spring concepts, one example at a time.&lt;/p&gt;

&lt;p&gt;If you’ve worked with Spring before, what’s one advanced Spring concept you think developers should understand better?&lt;/p&gt;

&lt;h1&gt;
  
  
  java #springframework #opensource #github #learninginpublic #backend #softwareengineering #spring #springboot #programming
&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 Testing Module</title>
      <dc:creator>Mujuzi Moses </dc:creator>
      <pubDate>Mon, 07 Sep 2026 09:03:28 +0000</pubDate>
      <link>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-testing-module-h6l</link>
      <guid>https://dev.to/iammujuzimoses/building-spring-by-example-completing-the-spring-testing-module-h6l</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 11 - Spring Testing&lt;/strong&gt;. 🎉&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Unit Testing with JUnit&lt;/li&gt;
&lt;li&gt;Spring TestContext&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@SpringBootTest&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@MockitoBean&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@TestConfiguration&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Integration Testing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the things I enjoyed about this module was understanding the different levels at which a Spring application can be tested.&lt;/p&gt;

&lt;p&gt;I started with &lt;strong&gt;unit testing&lt;/strong&gt;, where the goal is to test a class in isolation without starting the Spring application context. This helped reinforce the idea that not every test needs Spring.&lt;/p&gt;

&lt;p&gt;I then moved into the &lt;strong&gt;Spring TestContext&lt;/strong&gt;, where Spring can create and manage the application context for tests. This makes it possible to test components using the same dependency injection and configuration mechanisms used by the application.&lt;/p&gt;

&lt;p&gt;From there, I explored &lt;code&gt;@SpringBootTest&lt;/code&gt; and how it can be used to load the full Spring Boot application context. This helped connect the concepts of application startup, component scanning, dependency injection, and testing.&lt;/p&gt;

&lt;p&gt;I also explored mocking Spring-managed dependencies. With Spring Boot 4, the approach uses &lt;code&gt;@MockitoBean&lt;/code&gt; to replace a bean in the test context with a Mockito mock. This makes it possible to isolate the component being tested while still using Spring's dependency injection.&lt;/p&gt;

&lt;p&gt;Another interesting part was &lt;code&gt;@TestConfiguration&lt;/code&gt;, which allows test-specific beans to be defined without changing the production configuration. This was a useful way to understand how Spring's configuration system can be customized specifically for tests.&lt;/p&gt;

&lt;p&gt;Finally, I explored &lt;strong&gt;integration testing&lt;/strong&gt;, where multiple parts of the application work together instead of being tested in isolation.&lt;/p&gt;

&lt;p&gt;The integration testing example uses a controller, service, and repository together, starts the application on a random port, and makes a real HTTP request using &lt;code&gt;TestRestTemplate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That helped put the previous testing concepts together and made the distinction between unit tests and integration tests much clearer.&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 12&lt;/strong&gt; - continuing deeper into the Spring ecosystem and building on the concepts covered so far.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  java #springframework #opensource #github #gitlab #learninginpublic #backend #softwareengineering #spring #testing #junit
&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 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>
  </channel>
</rss>
