<?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: Md. Rakibul Hasan</title>
    <description>The latest articles on DEV Community by Md. Rakibul Hasan (@rakibhasan455).</description>
    <link>https://dev.to/rakibhasan455</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%2F446726%2F0e855cdc-6ad7-42a6-ac1d-e655720674d4.jpg</url>
      <title>DEV Community: Md. Rakibul Hasan</title>
      <link>https://dev.to/rakibhasan455</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rakibhasan455"/>
    <language>en</language>
    <item>
      <title>Spring vs Spring Boot</title>
      <dc:creator>Md. Rakibul Hasan</dc:creator>
      <pubDate>Tue, 16 Jun 2026 17:12:20 +0000</pubDate>
      <link>https://dev.to/rakibhasan455/spring-vs-spring-boot-8b8</link>
      <guid>https://dev.to/rakibhasan455/spring-vs-spring-boot-8b8</guid>
      <description>&lt;p&gt;Spring and Spring Boot are popular frameworks in the Java ecosystem that simplify the development of enterprise and microservices-based applications. They provide powerful features to reduce boilerplate code and improve productivity while building robust systems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enables development of scalable and production-ready applications&lt;/li&gt;
&lt;li&gt;Reduces complexity through simplified configuration and auto-setup&lt;/li&gt;
&lt;li&gt;Promotes modular design using reusable components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Spring &lt;br&gt;
Spring is a comprehensive Java framework that provides support for building robust and scalable enterprise applications. It focuses on dependency injection, aspect-oriented programming, and modular architecture.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dependency Injection (DI): Simplifies object creation and management, promoting loose coupling.&lt;/li&gt;
&lt;li&gt;Modular Framework: Offers various modules like Spring MVC, Spring Security, Spring Data, allowing selective use.&lt;/li&gt;
&lt;li&gt;Flexible Configuration: Supports XML, annotations, and Java-based configuration for application setup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: Spring application manually configured with beans and controllers:&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;@Configuration&lt;/span&gt;
&lt;span class="nd"&gt;@ComponentScan&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;basePackages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"com.example"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppConfig&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nd"&gt;@Bean&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;UserService&lt;/span&gt; &lt;span class="nf"&gt;userService&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;UserServiceImpl&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;span class="nd"&gt;@Controller&lt;/span&gt;
&lt;span class="nd"&gt;@RequestMapping&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/users"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserController&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;UserService&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="nd"&gt;@GetMapping&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;getUsers&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Model&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addAttribute&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"users"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userService&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getAllUsers&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"userList"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// JSP or HTML view&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Main class deployed as WAR on external server like Tomcat&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Main&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;){&lt;/span&gt;

        &lt;span class="c1"&gt;// Deploy this app manually to an external server&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;



</description>
      <category>backend</category>
      <category>java</category>
      <category>microservices</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Introduction to Spring Boot</title>
      <dc:creator>Md. Rakibul Hasan</dc:creator>
      <pubDate>Tue, 16 Jun 2026 16:45:45 +0000</pubDate>
      <link>https://dev.to/rakibhasan455/introduction-to-spring-boot-10d9</link>
      <guid>https://dev.to/rakibhasan455/introduction-to-spring-boot-10d9</guid>
      <description>&lt;p&gt;Spring is one of the most popular frameworks for building enterprise applications, but traditional Spring projects require heavy XML configuration, making them complex for beginners. Spring Boot solves this problem by providing a ready-to-use, production-grade framework on top of Spring, eliminating boilerplate configuration and enabling rapid development.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Reduces development time by simplifying project setup&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provides opinionated defaults for faster decision-making&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Makes it easier to build and deploy standalone applications&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Features:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Spring Boot provides all the features of Spring while being significantly easier to use. Here are its key features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-Configuration:&lt;/strong&gt; Spring Boot automatically configures the application based on the dependencies present in the project&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Embedded Server:&lt;/strong&gt; Spring Boot includes embedded servers like Tomcat, Jetty, or Undertow, allowing applications to run without external server installation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy Deployment:&lt;/strong&gt; Spring Boot applications can be packaged as JAR or WAR files and deployed directly to servers or cloud environments. By 2025, it offers seamless integration with Docker and Kubernetes for easier cloud-native deployment and scaling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Standalone Application:&lt;/strong&gt; Applications can run as executable JAR files using a simple main() method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Microservice-Based Architecture&lt;/strong&gt;: Spring Boot supports building independent, modular services instead of a monolithic application, improving scalability, maintainability, and deployment flexibility.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Evolution of Spring Boot&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Spring Boot was introduced in 2013 following a JIRA request by Mike Youngstrom to simplify Spring bootstrapping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Major Spring Boot Versions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Spring Boot 1.0 (April 2014)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spring Boot 2.0 (March 2018)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Spring Boot 3.0 (November 2022) (Introduced Jakarta EE 9+, GraalVM support)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Latest Version (2025): Spring Boot 3.x (Enhancements in observability, native images and containerization)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Spring Boot Architecture&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To understand the architecture of Spring Boot, let’s examine its different layers and components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sc7qbgh5w9z50bb0yst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sc7qbgh5w9z50bb0yst.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s understand the layered architecture in application development, which helps organize code by separating responsibilities into different layers, improving maintainability and scalability.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client Layer:&lt;/strong&gt; The external user or system that sends HTTP/HTTPS requests to interact with the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Controller Layer (Presentation Layer):&lt;/strong&gt; Handles client requests, processes them, and forwards them to the service layer while returning responses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Service Layer (Business Logic Layer):&lt;/strong&gt; Contains the business logic and coordinates operations between the controller and repository layers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Repository Layer (Data Access Layer):&lt;/strong&gt; Manages database operations such as create, read, update, and delete (CRUD).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model Layer (Entity Layer):&lt;/strong&gt; Represents the application's data structure and maps Java objects to database tables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database Layer:&lt;/strong&gt; The storage system where application data is permanently stored and retrieved.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Request Flow in Spring Boot&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Client -&amp;gt;Controller -&amp;gt;Service -&amp;gt;Repository -&amp;gt;Database -&amp;gt;Response&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A Client makes an HTTPS request (GET/POST/PUT/DELETE).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The request is handled by the Controller, which is mapped to the corresponding route.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If business logic is required, the Controller calls the Service Layer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Service Layer processes the logic and interacts with the Repository Layer to retrieve or modify data in the Database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The data is mapped using JPA with the corresponding Model/Entity class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The response is sent back to the client. If using Spring MVC with JSP, a JSP page may be returned as the response if no errors occur.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Applications of Spring Boot&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Spring Boot is widely used in modern software development because of its simplicity, scalability and production-ready features. Here are some of its major applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enterprise Applications:&lt;/strong&gt; Build complex applications such as Hospital Management Systems, Banking Systems or ERP solutions with minimal configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud-Native Applications:&lt;/strong&gt; Seamless integration with Docker, Kubernetes and cloud platforms (AWS, Azure, GCP) for deployment and scaling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Real-Time Applications:&lt;/strong&gt; Supports Reactive Programming for chat applications, streaming platforms, IoT systems and event-driven systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Batch Processing Applications:&lt;/strong&gt; With Spring Batch, Spring Boot is used for ETL (Extract, Transform, Load), report generation and large data processing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>How I Learned Unit Testing in Spring Boot by Building One Simple Project</title>
      <dc:creator>Md. Rakibul Hasan</dc:creator>
      <pubDate>Sat, 06 Jun 2026 15:05:58 +0000</pubDate>
      <link>https://dev.to/rakibhasan455/how-i-learned-unit-testing-in-spring-boot-by-building-one-simple-project-2eg0</link>
      <guid>https://dev.to/rakibhasan455/how-i-learned-unit-testing-in-spring-boot-by-building-one-simple-project-2eg0</guid>
      <description>&lt;h1&gt;
  
  
  What Building a Simple Spring Boot CRUD API Taught Me About Unit Testing
&lt;/h1&gt;

&lt;p&gt;When I first started learning Spring Boot, I constantly heard senior developers talking about &lt;strong&gt;Unit Testing&lt;/strong&gt;, &lt;strong&gt;JUnit&lt;/strong&gt;, &lt;strong&gt;Mockito&lt;/strong&gt;, and &lt;strong&gt;Test-Driven Development (TDD)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The problem?&lt;/p&gt;

&lt;p&gt;Most tutorials were either &lt;strong&gt;too simple&lt;/strong&gt; or &lt;strong&gt;too complicated&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So instead of watching endless videos, I decided to build a small project and learn testing through actual code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Project
&lt;/h2&gt;

&lt;p&gt;I created a simple &lt;strong&gt;Task Management API&lt;/strong&gt; with the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create Task&lt;/li&gt;
&lt;li&gt;Update Task&lt;/li&gt;
&lt;li&gt;Delete Task&lt;/li&gt;
&lt;li&gt;Get Task by ID&lt;/li&gt;
&lt;li&gt;List All Tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing fancy.&lt;/p&gt;

&lt;p&gt;The goal wasn't to build another Todo application.&lt;/p&gt;

&lt;p&gt;The goal was to &lt;strong&gt;learn testing&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Not Everything Needs a Spring Context
&lt;/h3&gt;

&lt;p&gt;My first mistake was using &lt;code&gt;@SpringBootTest&lt;/code&gt; everywhere.&lt;/p&gt;

&lt;p&gt;As a result, tests became slower because the entire Spring application context was loading for every test.&lt;/p&gt;

&lt;p&gt;For service-layer testing, plain &lt;strong&gt;JUnit 5&lt;/strong&gt; and &lt;strong&gt;Mockito&lt;/strong&gt; were more than enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Use the lightest testing approach that gets the job done.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Mock Dependencies, Not the Class Under Test
&lt;/h3&gt;

&lt;p&gt;One of the biggest testing concepts I learned was that the class being tested should be real, while its dependencies should be mocked.&lt;/p&gt;

&lt;p&gt;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;@Mock&lt;/span&gt;
&lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;TaskRepository&lt;/span&gt; &lt;span class="n"&gt;taskRepository&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;@InjectMocks&lt;/span&gt;
&lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="nc"&gt;TaskService&lt;/span&gt; &lt;span class="n"&gt;taskService&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allowed me to verify business logic without connecting to a database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Test the service. Mock the repository.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Test Behavior, Not Implementation
&lt;/h3&gt;

&lt;p&gt;Initially, I focused on internal method calls and implementation details.&lt;/p&gt;

&lt;p&gt;Later, I realized that tests become more maintainable when they verify outcomes instead.&lt;/p&gt;

&lt;p&gt;Instead of checking how many methods were called internally, I started verifying whether the correct result was produced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Users care about results, not implementation details.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Edge Cases Matter More Than Happy Paths
&lt;/h3&gt;

&lt;p&gt;Most bugs don't happen during ideal scenarios.&lt;/p&gt;

&lt;p&gt;They happen when unexpected input appears.&lt;/p&gt;

&lt;p&gt;Some examples I tested:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Task not found&lt;/li&gt;
&lt;li&gt;Null input&lt;/li&gt;
&lt;li&gt;Empty task title&lt;/li&gt;
&lt;li&gt;Duplicate task creation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Writing tests for these scenarios increased my confidence in the application significantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Edge cases often reveal the most valuable bugs.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Testing Improves Design
&lt;/h3&gt;

&lt;p&gt;This was the biggest surprise.&lt;/p&gt;

&lt;p&gt;The more tests I wrote, the more obvious poor design decisions became.&lt;/p&gt;

&lt;p&gt;Large service classes became difficult to test.&lt;/p&gt;

&lt;p&gt;Complex methods became harder to mock and verify.&lt;/p&gt;

&lt;p&gt;Those pain points naturally pushed me toward better architecture and cleaner code.&lt;/p&gt;

&lt;p&gt;Testing didn't just improve code quality.&lt;/p&gt;

&lt;p&gt;It improved the design itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Good tests encourage good architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Recommended Learning Path
&lt;/h2&gt;

&lt;p&gt;If you're new to Spring Boot testing, here's the path I would recommend:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learn JUnit 5 basics&lt;/li&gt;
&lt;li&gt;Learn Mockito fundamentals&lt;/li&gt;
&lt;li&gt;Build a small CRUD project&lt;/li&gt;
&lt;li&gt;Write service-layer tests&lt;/li&gt;
&lt;li&gt;Add controller tests using MockMvc&lt;/li&gt;
&lt;li&gt;Learn integration testing afterward&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Don't start with advanced topics.&lt;/p&gt;

&lt;p&gt;Start small.&lt;/p&gt;

&lt;p&gt;Write tests consistently.&lt;/p&gt;

&lt;p&gt;Improve gradually.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Unit testing felt intimidating when I started.&lt;/p&gt;

&lt;p&gt;Today, I see it as one of the most valuable skills a backend developer can learn.&lt;/p&gt;

&lt;p&gt;If you're struggling with testing, stop watching tutorials for a moment.&lt;/p&gt;

&lt;p&gt;Build a small project.&lt;/p&gt;

&lt;p&gt;Write one test.&lt;/p&gt;

&lt;p&gt;Then write another.&lt;/p&gt;

&lt;p&gt;You'll learn much faster by doing than by consuming content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Happy coding! 🚀
&lt;/h3&gt;




&lt;p&gt;&lt;strong&gt;Question for the community:&lt;/strong&gt;&lt;br&gt;
What was the biggest challenge you faced when learning unit testing in Spring Boot?&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>java</category>
      <category>springboot</category>
      <category>testing</category>
    </item>
    <item>
      <title>What to do if Java command is not recognized by terminal.</title>
      <dc:creator>Md. Rakibul Hasan</dc:creator>
      <pubDate>Wed, 05 Aug 2020 10:13:44 +0000</pubDate>
      <link>https://dev.to/rakibhasan455/what-to-do-if-java-command-is-not-recognized-by-terminal-o4c</link>
      <guid>https://dev.to/rakibhasan455/what-to-do-if-java-command-is-not-recognized-by-terminal-o4c</guid>
      <description>&lt;p&gt;Now a days we install java in our windows for our own work.But it's quite annoying while it's not recognized by the terminal.Sometimes we even run java file from terminal so it needs to be fixed.&lt;br&gt;
So here is the thing that you can do.&lt;br&gt;
Step 1:&lt;br&gt;
First of all right click on this pc.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy1uiop7yxjjvc2rix0i1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fy1uiop7yxjjvc2rix0i1.PNG" alt="Alt Text" width="394" height="318"&gt;&lt;/a&gt;&lt;br&gt;
Step 2:&lt;br&gt;
Go to properties and click advanced system settings.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbljaibr5fhtuiz75mbc6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbljaibr5fhtuiz75mbc6.PNG" alt="Alt Text" width="791" height="597"&gt;&lt;/a&gt;&lt;br&gt;
Step 3:&lt;br&gt;
Now click on environment variables.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foqhyj99kq9uvmxe63m8i.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foqhyj99kq9uvmxe63m8i.PNG" alt="Alt Text" width="784" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Step 4:&lt;br&gt;
Now look at user variables. Look if there is any path variable. &lt;br&gt;
If there is path variable then look at &lt;b&gt;Method 1&lt;/b&gt;..&lt;br&gt;
If there is no path variable then look at &lt;b&gt;Method 2&lt;/b&gt;..&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdfhxfjp3qao1t2d18spi.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdfhxfjp3qao1t2d18spi.PNG" alt="Alt Text" width="621" height="587"&gt;&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Method 1:&lt;/b&gt;&lt;br&gt;
in your case if there is path variable.You have to select path variable and click edit.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm9zegbw59rnl9rkoun4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm9zegbw59rnl9rkoun4.PNG" alt="Alt Text" width="620" height="584"&gt;&lt;/a&gt;&lt;br&gt;
Now click on new . And paste the location of your java bin folder.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" alt="Alt Text" width="800" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Click and copy the location.In my case it's location is:&lt;br&gt;
C:\Program Files\Java\jdk-14.0.1\bin&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4ka3sjgll6o97yjmq0c0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4ka3sjgll6o97yjmq0c0.PNG" alt="Alt Text" width="523" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on ok .Then open the terminal.&lt;br&gt;
write--&amp;gt; "Java -version".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" alt="Alt Text" width="680" height="295"&gt;&lt;/a&gt;&lt;br&gt;
it should show your java version. &lt;br&gt;
If it's not then reinstall java by downloading java executable file from &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Method 2&lt;/b&gt;&lt;br&gt;
If there is no path variable then click on new.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5vkiybxtqv5kzqb27gaf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5vkiybxtqv5kzqb27gaf.PNG" alt="Alt Text" width="617" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;write the variable name as "path" And paste the location of your java bin folder in variable value box.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl13pxd4izsnq8nwlvxjm.PNG" alt="Alt Text" width="800" height="602"&gt;&lt;/a&gt;&lt;br&gt;
Click and copy the location.In my case it's location is:&lt;br&gt;
"C:\Program Files\Java\jdk-14.0.1\bin"&lt;/p&gt;

&lt;p&gt;So i have wrote the variable name as "path" and pasted "C:\Program Files\Java\jdk-14.0.1\bin"&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdd3hnvk3e8nwqol1mo0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdd3hnvk3e8nwqol1mo0.PNG" alt="Alt Text" width="652" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on ok .Then open the terminal.&lt;br&gt;
write--&amp;gt; "Java -version".&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2xcz47gzb1t5vvu1r7r.PNG" alt="Alt Text" width="680" height="295"&gt;&lt;/a&gt;&lt;br&gt;
it should show your java version. &lt;br&gt;
If it's not then reinstall java by downloading java executable file from &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html" rel="noopener noreferrer"&gt;https://www.oracle.com/java/technologies/javase-downloads.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope it will help you. Thanks !&lt;/p&gt;

</description>
      <category>java</category>
      <category>compiler</category>
    </item>
  </channel>
</rss>
