<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dhanushpandijeyapal on Medium]]></title>
        <description><![CDATA[Stories by Dhanushpandijeyapal on Medium]]></description>
        <link>https://medium.com/@dhanushpandijeyapal?source=rss-c13029e5350d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3jDpT6hrhmXeAN04</url>
            <title>Stories by Dhanushpandijeyapal on Medium</title>
            <link>https://medium.com/@dhanushpandijeyapal?source=rss-c13029e5350d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:56:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhanushpandijeyapal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Swagger (OpenAPI) -Explanation with Real Examples]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/swagger-openapi-explanation-with-real-examples-8d4d7b5b118a?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d4d7b5b118a</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 10:08:06 GMT</pubDate>
            <atom:updated>2026-03-27T10:08:06.856Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog explains your Swagger (OpenAPI) code in a <strong>very clear, neat sentence format</strong>, along with simple real-time examples so anyone can understand easily.</p><h3>🛠 Step 1: Create OpenAPI (Swagger) File</h3><pre>openapi: 3.0.0<br>info:<br>  title: Employee Onboarding APIs<br>  version: 1.0.0<br>  description: Managing the Employee APIs<br><br>servers:<br>  - url : http://localhost:8089<br>paths:<br>  /employee:<br>    get:<br>      tags:<br>        - employee<br>      operationId: getAll<br>      summary: Get the Employee details<br>      responses:<br>        &#39;200&#39;:<br>          description: success<br>          content:<br>            application/json:<br>              schema:<br>                type: array<br>                items:<br>                  $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br>    post:<br>      tags:<br>        - employee<br>      operationId: add<br>      summary: Add the Employee details<br>      requestBody:<br>        required: true<br>        content:<br>          application/json:<br>            schema:<br>              $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br>      responses:<br>        &#39;201&#39;:<br>          description: created success<br>          content:<br>            application/json:<br>              schema:<br>                $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br>  /employee/{id}:<br>    put:<br>      tags:<br>        - employee<br>      operationId: putById<br>      summary: Update the details by the id<br>      parameters:<br>        - name: id<br>          in: path<br>          required: true<br>          schema:<br>            type: string<br>            format: uuid<br>      requestBody:<br>        required: true<br>        content:<br>          application/json:<br>            schema:<br>              $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br>      responses:<br>        &#39;200&#39;:<br>          description: success<br>          content:<br>            application/json:<br>              schema:<br>                $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br><br>    get:<br>      tags:<br>        - employee<br>      operationId: getById<br>      summary: Get the Employee details by id<br>      parameters:<br>        - name: id<br>          in: path<br>          required: true<br>          schema:<br>            type: string<br>            format: uuid<br>      responses:<br>        &#39;200&#39;:<br>          description: success<br>          content:<br>            application/json:<br>              schema:<br>                $ref: &#39;#/components/schemas/EmployeeDTO&#39;<br>    delete:<br>      tags:<br>        - employee<br>      operationId: deleteById<br>      summary: Delete the Employee details by id<br>      parameters:<br>        - name: id<br>          in: path<br>          required: true<br>          schema:<br>            type: string<br>            format: uuid<br>      responses:<br>        &#39;204&#39;:<br>          description: No content<br>components:<br>  schemas:<br>    EmployeeDTO:<br>      type: object<br>      properties:<br>        id:<br>          type: string<br>          format: uuid<br>        name:<br>          type: string<br>        age:<br>          type: integer<br>        salary:<br>          type: integer<br>        email:<br>          type: string<br>        phoneNo:<br>          type: integer<br>          format: int64</pre><h3>1. OpenAPI Version</h3><pre>openapi: 3.0.0</pre><p><strong>Explanation:</strong><br>This line tells that the API documentation is written using OpenAPI version 3.0.0.</p><p><strong>Example:</strong><br>Just like we use Java versions (Java 8, Java 17), Swagger also has versions. Here, version 3.0 is used.</p><h3>2. Info Section</h3><pre>info:<br>  title: Employee Onboarding APIs<br>  version: 1.0.0<br>  description: Managing the Employee APIs</pre><p><strong>Explanation:</strong><br>This section gives basic information about the API like its name, version, and purpose.</p><p><strong>Example:</strong><br>When you open Swagger UI, you will see:<br><strong>Employee Onboarding APIs — version 1.0.0</strong></p><h3>3. Server URL</h3><pre>servers:<br>  - url: http://localhost:8089</pre><p><strong>Explanation:</strong><br>This defines the base URL where your backend API is running.</p><p><strong>Example:</strong><br>All APIs will be called like:</p><ul><li><a href="http://localhost:8089/employee">http://localhost:8089/employee</a></li><li><a href="http://localhost:8089/employee/1">http://localhost:8089/employee/1</a></li></ul><h3>4. Paths (API Endpoints)</h3><p>Paths define all available APIs.</p><h3>GET /employee</h3><pre>/employee:<br>  get:</pre><p><strong>Explanation:</strong><br>This API is used to fetch all employee records from the database.</p><p><strong>Example:</strong></p><p>Request:</p><pre>GET /employee</pre><p>Response:</p><pre>[<br>  {<br>    &quot;id&quot;: &quot;1&quot;,<br>    &quot;name&quot;: &quot;Dhanush&quot;,<br>    &quot;age&quot;: 22,<br>    &quot;salary&quot;: 30000<br>  }<br>]</pre><h3>POST /employee</h3><pre>post:</pre><p><strong>Explanation:</strong><br>This API is used to create a new employee by sending data in the request body.</p><p><strong>Example</strong>:</p><p>Request:</p><pre>{<br>  &quot;name&quot;: &quot;Dhanush&quot;,<br>  &quot;age&quot;: 22,<br>  &quot;salary&quot;: 30000,<br>  &quot;email&quot;: &quot;dhanush@gmail.com&quot;,<br>  &quot;phoneNo&quot;: 9876543210<br>}</pre><p>Response:</p><pre>{<br>  &quot;id&quot;: &quot;generated-id&quot;,<br>  &quot;name&quot;: &quot;Dhanush&quot;<br>}</pre><h3>GET /employee/{id}</h3><p><strong>Explanation:</strong><br>This API retrieves a specific employee using the ID provided in the URL.</p><p><strong>Example</strong>:</p><p>Request:</p><pre>GET /employee/123</pre><p>Response:</p><pre>{<br>  &quot;id&quot;: &quot;123&quot;,<br>  &quot;name&quot;: &quot;Dhanush&quot;,<br>  &quot;age&quot;: 22<br>}</pre><h3>PUT /employee/{id}</h3><p><strong>Explanation</strong>:<br>This API updates the details of an existing employee using the given ID.</p><p><strong>Example:</strong></p><p>Request:</p><pre>PUT /employee/123</pre><pre>{<br>  &quot;name&quot;: &quot;Updated Name&quot;,<br>  &quot;salary&quot;: 40000<br>}</pre><h3>DELETE /employee/{id}</h3><p><strong>Explanation</strong>:<br>This API deletes an employee using the given ID.</p><p><strong>Example</strong>:</p><p>Request:</p><pre>DELETE /employee/123</pre><p>Response:</p><pre>204 No Content</pre><h3>5. Parameters</h3><pre>parameters:<br>  - name: id<br>    in: path</pre><p><strong>Explanation:</strong><br>This defines that the API expects an id value from the URL path.</p><p><strong>Example</strong>:<br>In /employee/123, the value 123 is the id.</p><h3>6. Request Body</h3><pre>requestBody:</pre><p><strong>Explanation:</strong><br>This defines the data that the client must send to the server.</p><p><strong>Example</strong>:<br>When creating an employee, you send JSON data like name, age, and email.</p><h3>7. Responses</h3><pre>responses:<br>  &#39;200&#39;: success</pre><p><strong>Explanation:</strong><br>This defines what response the API will return.</p><p><strong>Example</strong>:</p><ul><li>200 → Request successful</li><li>201 → Data created</li><li>204 → No content (delete success)</li></ul><h3>8. Schema (EmployeeDTO)</h3><pre>EmployeeDTO:<br>  type: object</pre><p><strong>Explanation:</strong><br>This defines the structure of the employee data.</p><h3>Fields Explanation:</h3><pre>id: string (uuid)<br>name: string<br>age: integer<br>salary: integer<br>email: string<br>phoneNo: integer</pre><p><strong>Explanation:</strong><br>Each field represents a property of an employee.</p><p><strong>Example JSON:</strong></p><pre>{<br>  &quot;id&quot;: &quot;abc-123&quot;,<br>  &quot;name&quot;: &quot;Dhanush&quot;,<br>  &quot;age&quot;: 22,<br>  &quot;salary&quot;: 30000,<br>  &quot;email&quot;: &quot;dhanush@gmail.com&quot;,<br>  &quot;phoneNo&quot;: 9876543210<br>}</pre><h3>9. operationId &amp; summary</h3><pre>operationId: getAll<br>summary: Get the Employee details</pre><p><strong>Explanation:</strong></p><ul><li>operationId is a unique name for the API</li><li>summary gives a short description</li></ul><p><strong>Example:</strong><br>In Swagger UI, users will see this description when viewing the API.</p><h3>🖥 Step 2: Add YAML File in Project</h3><ul><li>Go to src/main/resources</li><li>Create file → swagger.yaml</li><li>Paste your OpenAPI code</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVZEh_M-X1B34gvwyfrtiQ.png" /></figure><p>Now your API definition is inside the project.</p><h3>️ Step 3: Add Dependencies</h3><p>In this project, I used <em>OpenAPI Generator</em> instead of Swagger Codegen, as it is the latest and actively maintained tool for generating API code in Spring Boot applications.</p><pre>&lt;!-- Validation (Jakarta) --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-validation&lt;/artifactId&gt;<br>&lt;/dependency&gt;<br><br>&lt;!-- Swagger / OpenAPI --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springdoc&lt;/groupId&gt;<br>    &lt;artifactId&gt;springdoc-openapi-starter-webmvc-ui&lt;/artifactId&gt;<br>    &lt;version&gt;2.5.0&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;!-- Jackson Nullable (OpenAPI support) --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.openapitools&lt;/groupId&gt;<br>    &lt;artifactId&gt;jackson-databind-nullable&lt;/artifactId&gt;<br>    &lt;version&gt;0.2.6&lt;/version&gt;<br>&lt;/dependency&gt;</pre><h3>Step 4: Add Code Generation Plugin</h3><pre>&lt;plugin&gt;<br>    &lt;groupId&gt;org.openapitools&lt;/groupId&gt;<br>    &lt;artifactId&gt;openapi-generator-maven-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;7.10.0&lt;/version&gt;<br>    &lt;executions&gt;<br>       &lt;execution&gt;<br>          &lt;goals&gt;<br>             &lt;goal&gt;generate&lt;/goal&gt;<br>          &lt;/goals&gt;<br>          &lt;configuration&gt;<br>             &lt;inputSpec&gt;${project.basedir}/src/main/resources/swagger.yaml&lt;/inputSpec&gt;<br>             &lt;generatorName&gt;spring&lt;/generatorName&gt;<br>             &lt;apiPackage&gt;com.student.api&lt;/apiPackage&gt;<br>             &lt;modelPackage&gt;com.student.model&lt;/modelPackage&gt;<br>             &lt;generateSupportingFiles&gt;true&lt;/generateSupportingFiles&gt;<br>             &lt;configOptions&gt;<br>                &lt;nullable&gt;false&lt;/nullable&gt;<br>                &lt;interfaceOnly&gt;true&lt;/interfaceOnly&gt;<br>                &lt;delegatePattern&gt;false&lt;/delegatePattern&gt;<br>                &lt;skipDefaultInterface&gt;true&lt;/skipDefaultInterface&gt;<br>                &lt;useJakartaEe&gt;true&lt;/useJakartaEe&gt;<br>                &lt;useBeanValidation&gt;true&lt;/useBeanValidation&gt;<br>             &lt;/configOptions&gt;<br>          &lt;/configuration&gt;<br>       &lt;/execution&gt;<br>    &lt;/executions&gt;<br>&lt;/plugin&gt;</pre><h3>Step 5: Build the Project</h3><p>Run:</p><pre>mvn clean compile</pre><p>After build:</p><ul><li>Code will be generated inside target folder</li></ul><p>Generated files:</p><ul><li>API interfaces</li><li>Model classes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zdm5vHXWxncg0dgWiQJgFg.png" /></figure><h3>Step 6: Implement Controller Logic</h3><p>Swagger generates only structure, not logic.</p><p>So create your own controller:</p><pre>package com.employee.controller;<br><br><br>import com.employee.service.EmployeeService;<br>import com.student.api.EmployeeApi;<br>import com.student.model.EmployeeDTO;<br>import lombok.RequiredArgsConstructor;<br>import org.springframework.http.HttpStatus;<br>import org.springframework.http.ResponseEntity;<br>import org.springframework.web.bind.annotation.RestController;<br><br>import java.util.List;<br>import java.util.UUID;<br><br>@RestController<br>@RequiredArgsConstructor<br>public class EmployeeController implements EmployeeApi {<br><br>    private final EmployeeService employeeService;<br><br><br>    @Override<br>    public ResponseEntity&lt;EmployeeDTO&gt; add(EmployeeDTO employeeDTO) {<br>        return ResponseEntity.status(HttpStatus.CREATED).body(employeeService.add(employeeDTO));<br>    }<br><br>    @Override<br>    public ResponseEntity&lt;Void&gt; deleteById(UUID id) {<br>        employeeService.DeleteById(id);<br>        return ResponseEntity.status(HttpStatus.NO_CONTENT).build();<br>    }<br><br>    @Override<br>    public ResponseEntity&lt;List&lt;EmployeeDTO&gt;&gt; getAll() {<br>        return ResponseEntity.ok(employeeService.getAll());<br>    }<br><br>    @Override<br>    public ResponseEntity&lt;EmployeeDTO&gt; getById(UUID id) {<br>        return ResponseEntity.ok(employeeService.getById(id));<br>    }<br><br>    @Override<br>    public ResponseEntity&lt;EmployeeDTO&gt; putById(UUID id, EmployeeDTO employeeDTO) {<br>        return ResponseEntity.ok(employeeService.updateById(id , employeeDTO));<br>    }<br>}</pre><p>Important:<br> Never modify generated code<br>Always implement it separately</p><h3>Step 7: Run &amp; Test in Swagger UI</h3><p>Run your Spring Boot app.</p><p>Open:</p><pre>http://localhost:8089/swagger-ui/index.html</pre><p>You will see:</p><ul><li>All APIs</li><li>Request/response</li><li>“Try it out” button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qmOCx1PldQxYh1YHjmvKow.png" /></figure><h3>Final Summary</h3><p>This Swagger (OpenAPI) file clearly defines a complete Employee CRUD API. It shows how APIs should behave, what data they accept, and what responses they return. This makes backend development more structured and easy to understand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d4d7b5b118a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot Annotations]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/spring-boot-annotations-67ff611f82e6?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/67ff611f82e6</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Fri, 27 Mar 2026 05:25:08 GMT</pubDate>
            <atom:updated>2026-03-27T05:31:09.746Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*LqOAEEs-HDzuKMFGnJdzQw.png" /></figure><p>Spring Boot annotations are essential for building modern Java applications. They simplify development by reducing boilerplate code and allowing developers to configure applications using clean and readable declarative programming.</p><p>This guide covers all important annotations from <strong>Spring Boot, Lombok, JPA, and REST APIs</strong> in a structured and easy-to-understand manner.</p><h3>1. Core Spring Boot Annotation</h3><h3>@SpringBootApplication</h3><p>This annotation is the main entry point of a Spring Boot application. It is placed on the main class and is responsible for starting the application.</p><p>It internally includes:</p><ul><li>@Configuration → Marks the class as a configuration class</li><li>@EnableAutoConfiguration → Automatically configures the application based on dependencies</li><li>@ComponentScan → Scans and registers all required beans</li></ul><p>In simple terms, it initializes the application, configures it, and scans all components automatically.</p><h3>2. Stereotype Annotations (Layer-wise)</h3><p>These annotations define the role of each class in the application architecture and help maintain a clean layered structure.</p><h3>@Component</h3><p>This is a generic annotation used to create a Spring-managed bean. It is the base annotation for other specialized annotations.</p><h3>@Service</h3><p>This annotation is used in the service layer where business logic is implemented. It helps separate logic from controllers.</p><h3>@Repository</h3><p>This annotation is used in the data access layer. It interacts with the database and handles database-related exceptions.</p><h3>@Controller</h3><p>This annotation is used in traditional MVC applications and is responsible for returning HTML views.</p><h3>@RestController</h3><p>This annotation is used in REST APIs and returns data (usually JSON) directly to the client. It combines @Controller and @ResponseBody.</p><h3>3. Dependency Injection</h3><h3>@Autowired</h3><p>This annotation is used to automatically inject required dependencies into a class. It removes the need for manual object creation and improves loose coupling between components.</p><h3>4. Lombok Annotations (Very Important)</h3><p>Lombok annotations help reduce boilerplate code and make classes more readable.</p><h3>@Data</h3><p>This annotation automatically generates getters, setters, toString(), equals(), and hashCode() methods.</p><h3>@Builder</h3><p>This annotation provides a clean and flexible way to create objects using the builder pattern.</p><pre>User user = User.builder()<br>                .name(&quot;Dhanush&quot;)<br>                .build();</pre><h3>@RequiredArgsConstructor</h3><p>This creates a constructor for all final fields and is commonly used for dependency injection.</p><h3>@AllArgsConstructor</h3><p>This creates a constructor with all fields in the class.</p><h3>@NoArgsConstructor</h3><p>This creates a default empty constructor, which is required in some frameworks like JPA.</p><h3>5. Request Mapping (REST APIs)</h3><h3>@RequestMapping</h3><p>This is used as a base mapping annotation to define the root URL for APIs.</p><h3>HTTP Method Annotations</h3><ul><li>@GetMapping → Used to fetch data</li><li>@PostMapping → Used to create new data</li><li>@PutMapping → Used to update existing data</li><li>@DeleteMapping → Used to delete data</li></ul><p>These annotations make API endpoints more readable and meaningful.</p><h3>6. Request Handling</h3><h3>@RequestBody</h3><p>This annotation converts incoming JSON data into a Java object automatically.</p><h3>@ResponseBody</h3><p>This annotation converts Java objects into JSON responses.</p><h3>@RequestParam</h3><p>This is used to extract query parameters from the URL.</p><p>Example: /users?id=1</p><h3>@PathVariable</h3><p>This is used to extract dynamic values from the URL path.</p><p>Example: /users/1</p><h3>7. Validation</h3><h3>@Valid</h3><p>This annotation is used to trigger validation on incoming request data.</p><p>Common validation annotations include:</p><ul><li>@NotNull → Ensures the field is not null</li><li>@NotBlank → Ensures the field is not empty</li><li>@Email → Validates email format</li><li>@Size → Defines length constraints</li><li>@Min, @Max → Defines value limits</li></ul><p>These are mainly used in DTO classes to ensure data correctness.</p><h3>8. JPA Annotations</h3><p>JPA annotations are used to map Java classes to database tables.</p><h3>@Entity</h3><p>Marks a class as a database table.</p><h3>@Table</h3><p>Specifies the table name explicitly.</p><h3>@Id</h3><p>Defines the primary key.</p><h3>@GeneratedValue(strategy = GenerationType.IDENTITY)</h3><p>Automatically generates primary key values.</p><h3>Relationships</h3><p>These annotations define how tables are connected.</p><ul><li>@OneToOne → One-to-one relationship</li><li>@OneToMany → One-to-many relationship</li><li>@ManyToOne → Many-to-one relationship</li><li>@ManyToMany → Many-to-many relationship</li></ul><h3>@JoinColumn</h3><p>Defines the foreign key column.</p><h3>mappedBy</h3><p>Defines the inverse side of a relationship.</p><h3>cascade = CascadeType.ALL</h3><p>Applies all database operations (insert, update, delete) to related entities.</p><h3>9. MongoDB</h3><h3>@Document</h3><p>This annotation is used to map a class to a MongoDB collection instead of a relational table.</p><h3>10. Exception Handling</h3><h3>@ExceptionHandler</h3><p>Handles specific exceptions within a controller.</p><h3>@ControllerAdvice</h3><p>Provides global exception handling across the application.</p><h3>@RestControllerAdvice</h3><p>Similar to @ControllerAdvice but returns JSON responses.</p><h3>11. Configuration</h3><h3>@Configuration</h3><p>Marks a class as a configuration class.</p><h3>@Bean</h3><p>Used to manually create and manage beans.</p><h3>@Value</h3><p>Used to inject values from the application.properties file.</p><h3>12. Transaction Management</h3><h3>@Transactional</h3><p>This annotation ensures that database operations are executed safely. It commits changes if successful and rolls back if any error occurs.</p><h3>13. Security / Web</h3><h3>@CrossOrigin</h3><p>This annotation is used to allow communication between frontend and backend running on different domains by resolving CORS issues.</p><h3>14. Extra Important Annotations</h3><h3>@ComponentScan</h3><p>This annotation tells Spring where to scan for components.</p><h3>@EnableAutoConfiguration</h3><p>This enables automatic configuration based on project dependencies.</p><h3>Final Summary</h3><p>Spring Boot annotations play a crucial role in simplifying backend development. They help developers structure applications properly, reduce unnecessary code, and automate key functionalities such as dependency injection, request handling, and database interaction.</p><p>By understanding where and why to use each annotation, developers can build scalable and maintainable applications efficiently.</p><h4><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></h4><h4><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67ff611f82e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Microservices Architecture — A Complete Guide for Beginners]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/microservices-architecture-a-complete-guide-for-beginners-24e8571c5a03?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/24e8571c5a03</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Sat, 09 Aug 2025 09:10:42 GMT</pubDate>
            <atom:updated>2025-08-09T09:10:42.013Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Microservices Architecture — A Complete Guide for Beginners</h3><p>💡 <strong>Ever wondered how giants like Amazon, Netflix, or Flipkart handle millions of users without breaking a sweat?</strong><br> The secret: <strong>Microservices</strong> — a modern way of building software that’s fast, scalable, and reliable.</p><p>In this guide, you’ll learn:<br> ✅ What Microservices are &amp; why they’re so popular<br> ✅ The problems they solve compared to older architectures<br> ✅ Key components &amp; real-world examples<br> ✅ How they actually work step-by-step</p><p>By the end, you won’t just <em>know</em> what Microservices are — you’ll understand how they power the apps you use every day.</p><h3>📌 1. Introduction — What Are Microservices?</h3><p><strong>Microservices</strong> is an <strong>architectural style</strong> where an application is broken into <strong>small, independent services</strong>.</p><ul><li>Each service does <strong>one job</strong> (like handling payments or managing users).</li><li>They can be <strong>developed, deployed, and scaled independently</strong>.</li><li>Services talk to each other through <strong>APIs or messaging systems</strong>.</li></ul><p>💬 Think of it like a restaurant kitchen — different chefs handle different dishes, but work together to serve the customer.</p><h3>🔑 2. Key Characteristics</h3><ul><li><strong>Single Responsibility</strong> — Each service focuses on <strong>one business function</strong>.</li><li><strong>Independent Deployment</strong> — Update one service without touching the rest.</li><li><strong>Scalability</strong> — Scale only the services that need it.</li><li><strong>Communication</strong> — REST APIs, Kafka, RabbitMQ, etc.</li></ul><h3>⚡ 3. Why Microservices? (The Monolithic Problem)</h3><p><strong>Monolithic Architecture Issues:</strong><br> ❌ One small bug can crash the whole system<br> ❌ Hard to scale specific features<br> ❌ Big teams → messy code conflicts</p><p><strong>Microservices Benefits:</strong><br> ✅ Modular &amp; flexible<br> ✅ Independent scaling &amp; deployment<br> ✅ Fault isolation — if one fails, others work fine<br> ✅ Smaller teams can work in parallel</p><h3>🛒 4. Real-World Example — E-Commerce App</h3><p><strong>Services could include:</strong></p><ul><li>🧑‍🤝‍🧑 <strong>User Service</strong> — Manages accounts</li><li>🛒 <strong>Cart Service</strong> — Handles shopping cart</li><li>📦 <strong>Order Service</strong> — Processes orders</li><li>💳 <strong>Payment Service</strong> — Manages transactions</li><li>📧 <strong>Email Service</strong> — Sends notifications</li></ul><p>Each service works independently but communicates via APIs.</p><h3>🧩 5. Major Components of Microservices</h3><ul><li><strong>Service</strong> — Handles one function</li><li><strong>Discovery Server (Eureka)</strong> — Tracks where each service is</li><li><strong>API Gateway</strong> — One entry point for all clients</li><li><strong>REST API</strong> — Communication channel</li><li><strong>Database</strong> — Each service has its own DB</li><li><strong>Config Server</strong> — Central configuration</li><li><strong>Docker</strong> — Containers for deployment</li><li><strong>Load Balancer</strong> — Distributes requests</li></ul><h3>🔍 6. Discovery Server (Eureka)</h3><ul><li><strong>Purpose:</strong> Keeps track of all running services</li><li><strong>How it works:</strong> Services register with their name, IP, and port</li><li><strong>Failure handling:</strong> Caches service list &amp; supports clustering for reliability</li></ul><h3>🚪 7. API Gateway</h3><ul><li><strong>Acts as the “front door”</strong> of your system</li><li>Routes requests to the correct service</li><li>Adds security, logging, and load balancing</li><li>Hides internal complexity from clients</li></ul><p>📦 Example: On Amazon, login, search, and payments all pass through the API Gateway first.</p><h3>🔗 8. Service Communication</h3><ul><li><strong>REST APIs</strong> — Synchronous calls</li><li><strong>Messaging Queues (Kafka/RabbitMQ)</strong> — Asynchronous processing</li><li><strong>Service Discovery</strong> — Resolves names to actual IP addresses</li></ul><h3>🛠 9. How It All Runs (Execution Order)</h3><p>1️⃣ <strong>Discovery Server (Eureka)</strong> starts first<br> 2️⃣ <strong>Business Services</strong> register themselves<br> 3️⃣ <strong>API Gateway</strong> starts after registration<br> 4️⃣ Clients send requests → Gateway finds the service → Service responds</p><h3>📝 10. Workflow Summary</h3><ol><li>Start Eureka</li><li>Services register with Eureka</li><li>API Gateway receives client requests</li><li>Gateway finds service location from Eureka</li><li>Service processes request → sends response</li></ol><h3>🎯 11. Conclusion</h3><p>Microservices bring <strong>flexibility, scalability, and resilience</strong> to modern applications.<br> By understanding core parts like <strong>Discovery Server &amp; API Gateway</strong>, you can design <strong>fast, fault-tolerant, and easily scalable systems</strong> — just like the tech giants.</p><p>💬 If Monolithic apps are like a single giant machine, Microservices are like a team of skilled specialists — each doing their job perfectly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24e8571c5a03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ How to Connect PostgreSQL in a Spring Boot Application]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/how-to-connect-postgresql-in-a-spring-boot-application-05da716e9487?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/05da716e9487</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Tue, 05 Aug 2025 14:47:12 GMT</pubDate>
            <atom:updated>2025-08-05T14:47:12.839Z</atom:updated>
            <content:encoded><![CDATA[<p>Integrating <strong>PostgreSQL</strong> with <strong>Spring Boot</strong> is a common requirement in modern Java applications. PostgreSQL provides reliable and powerful data storage, while Spring Boot makes it easy to build and manage your backend services.</p><p>This step-by-step guide will walk you through the complete setup in a clear and simple way — perfect for beginners and professionals alike.</p><h4>🧠 What is PostgreSQL?</h4><p><strong><em>PostgreSQL</em></strong><em> is a powerful, free, and open-source database system that stores data in tables. It helps you save, search, and manage large amounts of structured information easily. Many developers use it because it’s reliable, secure, and supports advanced features.</em></p><h3>🔨 Step 1: Create a Spring Boot Project</h3><p>You can create your project using Spring Initializr:</p><ul><li><strong>Project</strong>: Maven</li><li><strong>Language</strong>: Java</li><li><strong>Spring Boot version</strong>: (latest stable version)</li><li><strong>Dependencies</strong>:</li><li>Spring Web</li><li>Spring Data JPA</li><li>PostgreSQL Driver</li></ul><p>Click <strong>Generate</strong>, and you’ll get a .zip file. Extract it and open it in your IDE (like IntelliJ, Eclipse, or VS Code).</p><h3>📦 Step 2: Add Dependencies</h3><p>In your pom.xml, make sure these dependencies are present:</p><pre>!-- PostgreSQL JDBC Driver --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.postgresql&lt;/groupId&gt;<br>    &lt;artifactId&gt;postgresql&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><pre>&lt;!-- Spring Data JPA --&gt;<br>&lt;dependency&gt;<br>    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;<br>&lt;/dependency&gt;</pre><p>These will allow your app to connect and interact with PostgreSQL using Spring Data JPA.</p><h3>⚙️ Step 3: Configure PostgreSQL in application.properties</h3><p>Create or edit src/main/resources/application.properties:</p><pre>properties# PostgreSQL Configuration<br>spring.datasource.url=jdbc:postgresql://localhost:5432/your_database<br>spring.datasource.username=your_username<br>spring.datasource.password=your_password<br>spring.datasource.driver-class-name=org.postgresql.Driver</pre><pre># JPA Configuration<br>spring.jpa.hibernate.ddl-auto=update<br>spring.jpa.show-sql=true<br>spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect</pre><p>Replace your_database, your_username, and your_password with your actual PostgreSQL details.</p><h3>🗂️ Step 4: Create a Model (Entity)</h3><p>Create a class to represent the data table.</p><pre>import jakarta.persistence.*;<br>@Entity<br>public class User {</pre><pre>    @Id<br>    @GeneratedValue(strategy = GenerationType.IDENTITY)<br>    private Long id;</pre><pre>    private String name;<br>    private String email;</pre><pre>    // Getters and Setters<br>}</pre><p>This class will be mapped to a user table in PostgreSQL.</p><h3>🧩 Step 5: Create a Repository Interface</h3><p>Spring Data JPA makes it easy to create a repository.</p><pre>import org.springframework.data.jpa.repository.JpaRepository;</pre><pre>public interface UserRepository extends JpaRepository&lt;User, Long&gt; {<br>    // You can add custom queries here if needed<br>}</pre><p>This interface gives you ready-made methods like save(), findAll(), and deleteById().</p><h3>🧪 Step 6: Create a Simple Service and Controller</h3><h4>🛠 Create the UserContoller class</h4><pre>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.web.bind.annotation.*;<br>import java.util.List;</pre><pre>@RestController<br>@RequestMapping(&quot;/users&quot;)<br>public class UserController {</pre><pre>    @Autowired<br>    private UserRepository userRepository;</pre><pre>    @PostMapping<br>    public User addUser(@RequestBody User user) {<br>        return userRepository.save(user);<br>    }</pre><pre>    @GetMapping<br>    public List&lt;User&gt; getUsers() {<br>        return userRepository.findAll();<br>    }<br>}</pre><h4>🛠 Create the UserService class</h4><pre>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.stereotype.Service;<br>import java.util.List;</pre><pre>@Service<br>public class UserService {</pre><pre>    @Autowired<br>    private UserRepository userRepository;</pre><pre>    public User addUser(User user) {<br>        return userRepository.save(user);<br>    }</pre><pre>    public List&lt;User&gt; getAllUsers() {<br>        return userRepository.findAll();<br>    }</pre><pre>    public User getUserById(Long id) {<br>        return userRepository.findById(id).orElse(null);<br>    }</pre><pre>    public void deleteUser(Long id) {<br>        userRepository.deleteById(id);<br>    }<br>}</pre><p>This service layer contains the core business logic and communicates with the repository.</p><h3>✅ Benefits of Using Spring Boot with PostgreSQL</h3><ol><li><strong>Fast Development</strong> — Spring Boot makes building backend APIs quick and easy.</li><li><strong>Reliable Storage</strong> — PostgreSQL safely stores your application data.</li><li><strong>Smooth Integration</strong> — They work well together with minimal configuration.</li></ol><h3>⭐ Merits</h3><ol><li><strong>Open Source</strong> — Both are free to use with strong community support.</li><li><strong>Scalable</strong> — Suitable for both small and large-scale applications.</li><li><strong>Secure &amp; Stable</strong> — PostgreSQL ensures data safety, and Spring Boot offers security features.</li></ol><h3>⚠️ Demerits</h3><ol><li><strong>Startup Memory Use</strong> — Spring Boot apps may use more memory at launch.</li><li><strong>Requires Configuration</strong> — PostgreSQL setup needs basic DB knowledge.</li><li><strong>Learning Curve</strong> — Beginners may need time to understand layers (Controller, Service, Repository).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05da716e9487" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GIT AND GITHUB:]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/git-and-github-dd34263b5b0d?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd34263b5b0d</guid>
            <category><![CDATA[git-and-github]]></category>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Fri, 30 May 2025 08:36:13 GMT</pubDate>
            <atom:updated>2025-05-30T09:06:39.556Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is git?</strong></p><p><strong>Git</strong> is a tool that helps people keep track of changes they make to computer programs. It remembers every change, so if something goes wrong, you can go back to an earlier version. It’s very helpful when many people are working on the same project.</p><p><strong>What is Github?</strong></p><p><strong>GitHub</strong> is a website where people can keep their Git projects online. It makes it easier for teams to work together. On GitHub, people can share their code, talk about changes, and work on projects from anywhere.</p><p><strong>How to create repositor in github</strong></p><ol><li>Install the github and sinup your account.</li><li>In home page of github, in leftside(Top Repositories (New)) click new for create new Repositor.</li><li>Inside the box(Repositor name),Enter your New Repositor name( The name must be valuable).</li><li>Public-Anyone on the internet can see this repository. You choose who can commit.</li><li>Private-You choose who can see and commit to this repository.</li><li>choose your Repositor in public or private.</li><li>Next In down,click (Create Repositor) then your repositor will create successfully.</li></ol><p><strong>How to insert the project (intelij or vscode) to github through git.</strong></p><ol><li>Open the terminal in (intelij or vscode).</li><li>Next scroll your new repositor page(…or create a new repository on the command line)</li></ol><pre>echo &quot;# management&quot; &gt;&gt; README.md<br>git init<br>git add README.md<br>git commit -m &quot;first commit&quot;<br>git branch -M main<br>git remote add origin https://github.com/*(enter your new repository link)*/management.git<br>git push -u origin main</pre><p>3.copy this commands one by one and paste it in terminal.</p><p>4.Finally, The code will be insert in your new Repositor.</p><p><strong>In the setup set use visual studio code as a default Git editor.</strong></p><p><strong>Move to your direct and set your username and email</strong></p><p>git config — global user.name “John Doe” // username in github</p><p>git config — global user.email johndoe@example.com //mail which used to signin in github</p><p><strong>First time if you create branch in github then in main branch give command:</strong></p><p>git pull</p><p><strong>For creating new branch</strong></p><p>git branch your_branch_name</p><p><strong>For commit your changes:</strong></p><p>git add.</p><p>git commit -m “commit-message”</p><p>git push</p><p><strong>To see the commits you have done:</strong></p><p>git log</p><p>if you want to exit click press”q”</p><p><strong>How to clone the project in github:</strong></p><ol><li>Click your repositor.</li><li>Next you click the button(&lt;&gt; code).</li><li>Click(HTTP-and copy the url link).</li><li>In (Intelij or vscode) click New-Project from version.. and then paste url link.</li><li>Finally, The project will be clone into your (Intelij or vscode).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd34263b5b0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker — Introduction]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/docker-introduction-fb09ff84795f?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb09ff84795f</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Tue, 27 May 2025 18:46:49 GMT</pubDate>
            <atom:updated>2025-05-27T18:46:49.383Z</atom:updated>
            <content:encoded><![CDATA[<p>Docker — Introduction</p><p>Docker is a tool that helps to run applications in an isolated environments called containers. It is putting an app in a box with everything it needs—code, libraries, settings—so it works the same everywhere.</p><p><strong>Why Docker Came?</strong><br>Before Docker, apps worked on one system but not on another because of differences in:</p><ul><li>OS</li><li>Libraries</li><li>Environment settings</li></ul><p>Docker came to solve the problem of “It works on my machine” by making the app and its environment portable.</p><p><strong>what is the docker image:</strong></p><p>Docker image is a ready to use setup of your app.You build an image, and then run it to create a container.</p><p><strong>How Docker Works?</strong><br>1. You create a Dockerfile (instructions to build an image).</p><p>2. Docker builds the image from it.</p><p>3. You run the image to start a container.</p><p>4. The container runs in isolation on your system using the Docker Engine.</p><p>In simple terms:<br>Dockerfile → Image → Container → Running App</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb09ff84795f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Spring Boot]]></title>
            <link>https://medium.com/@dhanushpandijeyapal/introduction-to-spring-boot-d870678b8d35?source=rss-c13029e5350d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d870678b8d35</guid>
            <dc:creator><![CDATA[Dhanushpandijeyapal]]></dc:creator>
            <pubDate>Sun, 25 May 2025 20:12:21 GMT</pubDate>
            <atom:updated>2025-05-25T20:12:21.881Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is SpringBoot?</strong></p><p>Spring is a java based framework used to build web applications and microservices.It’s part of the larger spring framework but it simplifies a lot of the setup needed to run the application.It is used to build backend faster with less effort.It handles things automatically.</p><p><strong>What can we do with Spring Boot?</strong></p><ul><li>Spring Boot is used to create web application,websites using Spring MVC.Uses Thymeleaf or JSP for front end</li><li>Used to build restful APIs for mobile and web apps</li><li>Builds microservices use with Spring cloud,ideal for large and scalable system</li><li>Connect to database, works with relational DBs like MySQL,SQL, Oracle</li></ul><p><strong>How does a Spring boot work?</strong></p><ol><li>User Sends a Request:</li></ol><ul><li>This could be clicking a button,submitting a form, or making an API call from frontend</li><li>The request is usually an HTTP request</li><li>This request goes to the spring boot application running on a web server .</li></ul><p>2. Dispatcher Serviet:</p><ul><li>Spring Boot contains a special component called Dispatcher Serviet.</li><li>It is like a traffic controller.It receives all request and decides where to send that request usually to a controller class that matches the URL pattern</li></ul><p>3. Controller:</p><ul><li>It process the request.It may talk to the service class, database and then it prepares a response and sends it back to the user.</li></ul><p>4. Service layer:</p><ul><li>This layer contains logic of the application.It acts as a middleman between the controller and the repository.</li><li>It performs calcualtions,validations or processing and call method from the repository layer, return results to the controller.</li></ul><p>5. Repository layer:</p><ul><li>This layer is resonsible for interacting with the database.Spring Boot can generate most DB methods.</li><li>It fetch,insert,update and delete data.</li></ul><p>6. Response:</p><ul><li>This is the final output sent back to the user/client after processing the request.</li><li>The controller method returns the response and spring boot handles the rest.</li><li>User request → Dispatcher → Controller → Service → Repository → Response</li></ul><p><strong>What is Dependency Injection?</strong></p><p>Spring Boot automatically creates and gives object when needed.You don’t create them manually using new, instead you use @Autowired</p><p><strong>What is Payload?</strong></p><ul><li>Payload is the data send from the frontend to the backend usually in the request body</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d870678b8d35" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>