<?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 Pravin on Medium]]></title>
        <description><![CDATA[Stories by Pravin on Medium]]></description>
        <link>https://medium.com/@pravinmuruganantham123?source=rss-1f7603b80824------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8cQYLk3XGVe1DTZc</url>
            <title>Stories by Pravin on Medium</title>
            <link>https://medium.com/@pravinmuruganantham123?source=rss-1f7603b80824------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:48:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pravinmuruganantham123/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[Spring Data JPA Relationships — A Beginner-friendly Guide]]></title>
            <link>https://medium.com/@pravinmuruganantham123/spring-data-jpa-relationships-a-beginner-friendly-guide-b5a598f415cc?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5a598f415cc</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 13:32:07 GMT</pubDate>
            <atom:updated>2026-01-09T13:32:07.814Z</atom:updated>
            <content:encoded><![CDATA[<h3>Spring Data JPA Relationships — A Beginner-friendly Guide</h3><p>Hello readers, Today I have explored an important topic in Spring Boot named Spring data JPA relationships. In real world applications, data is not isolated. Tables and datas are connected to each other through relationships. Whenever multiple entities are coming into picture inside your application you need to specify that how those entities are inter-related to each other. Spring Data JPA makes it easy to handle these relationships using annotations, without writing any complex SQL queries.</p><p>In this blog, you will clearly understand what JPA relationships are, why they are needed, how to use them in a efficient and correct way in spring boot with simple examples and what is cascade type &amp; common cascade types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SW_Hu3eT105nKSoocQvCyw.jpeg" /><figcaption>Spring Data JPA Relationships</figcaption></figure><h4>What are JPA Relationships?</h4><p>A relationships in JPA(Java Persistence API) defines how two or more entities are connected to each other in a database. In database terms the relationships are created using foreign keys. In JPA, we define the relationships using annotations.</p><p><strong>For Example:</strong></p><p>→ One customer can place many orders.</p><p>→ One student can have one ID card.</p><h4>Types of Relationships in spring data JPA:</h4><p>JPA supports four main types of relationships. They are:</p><ol><li><strong>One-to-One</strong></li><li><strong>One-to-Many</strong></li><li><strong>Many-to-One</strong></li><li><strong>Many-to-Many</strong></li></ol><p>Let me explain each relationships with example.</p><h4>1. One-to-One:</h4><p>→ One-to-One relationship means one record or column in one table is connected exactly to the one record or column in the another table.</p><p><strong>Example:</strong></p><p>→ One user has one profile that means each user can have only one profile and each profile belongs to only one user.</p><p><strong>Database view:</strong></p><pre>USER table          PROFILE table<br>----------          -------------<br>id (PK)             id (PK)<br>name                address<br>profile_id (FK) --&gt; user_id</pre><p><strong>Example code:</strong></p><pre>//Profile Entity<br>@Entity<br>public class Profile {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String address;<br>}</pre><pre>//User Entity<br>@Entity<br>public class User {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String name;<br><br>    @OneToOne<br>    @JoinColumn(name = &quot;profile_id&quot;)<br>    private Profile profile;<br>}</pre><p><strong>Annotations Used and Its Purpose:</strong></p><p>→ @OneToOne: Tells JPA that this is a one-to-one relationship.</p><p>→ @JoinColumn: Creates a foreign key in the User table.</p><h4>2. One-to-Many:</h4><p>→ A One-to-Many relationship means one record or column in one table is connected to many records in the another table.</p><p><strong>Example:</strong></p><p>→ In an e-commerce application, One customer can place multiple orders(one-to-many) and each order belongs to one customer(one-to-one).</p><p><strong>Database view:</strong></p><pre>CUSTOMER table          ORDER table<br>---------------         ------------<br>id (PK)                 id (PK)<br>name                    product<br>                        customer_id (FK)</pre><p><strong>Example code:</strong></p><pre>//Customer Entity<br>@Entity<br>public class Customer {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String name;<br><br>    @OneToMany(mappedBy = &quot;customer&quot;)<br>    private List&lt;Order&gt; orders;<br>}</pre><pre>//Order Entity<br>@Entity<br>public class Order {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String product;<br><br>    @ManyToOne<br>    @JoinColumn(name = &quot;customer_id&quot;)<br>    private Customer customer;<br>}</pre><p><strong>Annotations Used and Its Purpose:</strong></p><p>→ @OneToMany: One customer has many orders.</p><p>→ (mappedBy=”customer”): Used to mark non-owning side, which tells JPA that Order owns the relationship.</p><p>→ @ManyToOne: Many orders belongs to one customer.</p><p>→ @JoinColumn: Creates customer_id foreign key in Order table.</p><h4>3. Many-To-One:</h4><p>→ A Many-To-One relationship means many records in the table is connected to single record in the another table.</p><p><strong>Example:</strong></p><p>→ In a company many employees works for one department (many-to-one) and each employee belongs to only one department(one-to-one).</p><p><strong>Database view:</strong></p><pre>DEPARTMENT table        EMPLOYEE table<br>----------------        --------------<br>id (PK)                 id (PK)<br>name                    name<br>                        department_id (FK)</pre><p><strong>Example code:</strong></p><pre>//Department Entity<br>@Entity<br>public class Department {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String name;<br>}</pre><pre>//Employee Entity<br>@Entity<br>public class Employee {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String name;<br><br>    @ManyToOne<br>    @JoinColumn(name = &quot;department_id&quot;)<br>    private Department department;<br>}</pre><p><strong>Annotations Used and Its Purpose:</strong></p><p>→ @ManyToOne: Many employees belongs to one department.</p><p>→ @JoinColumn: Creates department_id foreign key in employee table.</p><h4>4. Many-To-Many:</h4><p>→ A Many-To-Many relationship means many records in one table is connected to many records in other table.</p><p><strong>Example:</strong></p><p>→ In an education system a student can have multiple courses and a course can have multiple students.</p><p><strong>Database view:</strong></p><pre>STUDENT table        COURSE table        STUDENT_COURSE table<br>-------------        ------------        --------------------<br>id (PK)              id (PK)             student_id (FK)<br>name                 name                course_id (FK)</pre><p>→ STUDENT_COURSE(Join table) is created newly because databases cannot directly handle many-to-many.</p><p><strong>Example code:</strong></p><pre>//Student Entity<br>@Entity<br>public class Student {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String name;<br><br>    @ManyToMany<br>    @JoinTable(<br>        name = &quot;student_course&quot;,<br>        joinColumns = @JoinColumn(name = &quot;student_id&quot;),<br>        inverseJoinColumns = @JoinColumn(name = &quot;course_id&quot;)<br>    )<br>    private List&lt;Course&gt; courses;<br>}</pre><pre>//Course Entity<br>@Entity<br>public class Course {<br><br>    @Id<br>    @GeneratedValue<br>    private Long id;<br><br>    private String title;<br><br>    @ManyToMany(mappedBy = &quot;courses&quot;)<br>    private List&lt;Student&gt; students;<br>}</pre><p><strong>Annotations Used and Its Purpose:</strong></p><p>→ @ManyToMany: Many students can have many courses and also many courses can have many students.</p><p>→ @JoinTable: Creates a separate join table.</p><p>→ joinColumns : Foreign key of student entity.</p><p>→ inverseJoinColumns: Foreign key of course entity.</p><h4>What is Cascade Type in Spring Data JPA:</h4><p>→ Cascade Type decides what should happen to child entities when an action is performed on the parent entity.</p><p>→ If you either save or delete the parent, should the child also be either saved or deleted automatically was the question. In this kind of situation Cascade type gives the clear view about what happens.</p><p><strong>Why Cascade type is needed:</strong></p><p>→ Without cascade: You must save both parent and child manually.</p><p>→ With cascade: JPA does it automatically.</p><p><strong>Common Cascade Types:</strong></p><ol><li>Persist</li><li>Merge</li><li>Remove</li><li>Refresh</li><li>All</li></ol><p><strong>Explanation:</strong></p><ol><li><strong>CascadeType.PERSIST:</strong></li></ol><p>→ When parent is saved, the child is also saved automatically.</p><p>Example: Saving Customer → Orders saved automatically.</p><p>2. <strong>CascadeType.MERGE:</strong></p><p>→ When parent is updates child is also updated automatically.</p><p>Example: Updating Customers → Orders Updated</p><p>3. <strong>CascadeType.REMOVE:</strong></p><p>→ When parent is deleted the child is also deleted.</p><p>Example: Delete Customers → All Orders will be deleted.</p><p>4. <strong>CascadeType.REFRESH:</strong></p><p>→ When parent is refreshed the child is also refreshed from DB(used rarely).</p><p>Example: Refresh Customers → Orders refreshed automatically.</p><p>5. <strong>CascadeType.ALL:</strong></p><p>→ It applies all cascade operations.</p><p>Equivalent to:</p><pre>PERSIST, MERGE, REMOVE, REFRESH</pre><p>That’s all about Spring data JPA relationships and its cascade styles. I hope this blog will be useful.</p><p>Happy Learning……!</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><p><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5a598f415cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spring Boot Annotations]]></title>
            <link>https://medium.com/@pravinmuruganantham123/spring-boot-annotations-a1eaa2894c4a?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1eaa2894c4a</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 13:15:39 GMT</pubDate>
            <atom:updated>2026-01-08T13:15:39.375Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers, Today I explored an interesting topic named Annotations in Spring Boot. In Spring Boot, annotations play a vital and crucial role in building applications faster and cleaner. They help developers reduce boilerplate code, simplify configuration, and focus more on business logic instead of setup. From defining controllers and services to handling dependency injection and database mapping, annotations are used everywhere in a Spring Boot project. In this blog, I will explain the most commonly used Spring Boot annotations, why they are important, and how they are used in real-world applications in a simple and easy way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*uoEgmPl8GZPNMBAP.png" /><figcaption>Most used Spring Boot Annotations</figcaption></figure><h4>1. @SpringBootApplication:</h4><p>→ @SpringBootApplication is the main annotation which will be used in the main class. It is used to start and configure the spring boot application.</p><p>→ It acts as a entry point that auto-configures, scan components, and starts the application.</p><p>→ @SpringBootApplication is an combination of three annotations namely:</p><ol><li>@ComponentScan</li><li>@EnableAutoConfiguration</li><li>@Configuration</li></ol><p><strong>@ComponentScan:</strong> It automatically scans the spring components such as @Controller, @Component, @Service, @Repository, in the same package and sub packages.</p><p><strong>@EnableAutoConfiguration:</strong> It enables auto configuration, that means spring sets up beans automatically based on dependencies. For example If spring-boot-starter-web is present then automatically configures Tomcat.</p><p><strong>@Configuration:</strong> It marks the class as configuration class and allows you to define beans using @Bean annotation. This configuration class contains spring configuration.</p><p><strong>Example:</strong></p><pre>@SpringBootApplication<br>public class MyApplication {<br>    public static void main(String[] args) {<br>        SpringApplication.run(MyApplication.class, args);<br>    }<br>}</pre><p><strong>→ @SpringBootApplication = Configuration +Scan components +Enables auto configuration.</strong></p><h4>2.@Controller:</h4><p>→ A controller class is a class where we are going to write our actual API’s. It handles the HTTP requests comes to your application.</p><p>→ <strong>Workflow</strong>: Request from the user will reach the server → From the server it will reach the dispatcher servlet → From dispatcher servlet it will reach the controller where the API’s are available. In this process Controller helps the dispatcher servlet to find it out and maps the request coming from the user to the respective controller.</p><p><strong>Example:</strong></p><pre>@Controller<br>public class HomeController {<br><br>    @GetMapping(&quot;/home&quot;)<br>    public String homePage() {<br>        return &quot;home&quot;; // returns home.html / home.jsp<br>    }<br>}</pre><h4>3. @ResponseBody:</h4><p>→ It helps to convert the return value either a string or object into JSON or XML form and sends it directly to the client without rendering any UI page.</p><p>→ It indicates that, Response of the API should be a body and not any view like a HTML page.</p><p><strong>Example:</strong></p><pre>@Controller<br>public class HelloController {<br><br>    @GetMapping(&quot;/hello&quot;)<br>    @ResponseBody<br>    public String sayHello() {<br>        return &quot;Hello Spring Boot&quot;;<br>    }<br>}<br><br>Output:<br>  Hello Spring Boot</pre><p>→ It returns data directly to the browser instead of a view page.</p><h4>4. @RestController:</h4><p>→ It is a Spring boot annotation used to create a REST API’s. It tells spring that this class will handle the REST API requests and returns the data directly.</p><p>→ Instead of annotating every function with @ResponseBody we can @RestController instead of @Controller. It defines the controller class where all methods returns JSON or XML responses directly instead of UI pages.</p><p>@Controller → Handles HTTP requests.</p><p>@ResponseBody → Returns the JSON data instead of view.</p><p>→ @RestController combines both @Controller and @ResponseBody.</p><p>→ No need to write @ResponseBody for every method. All methods returns data directly.</p><p><strong>Example:</strong></p><pre>@RestController<br>public class HelloController {<br><br>    @GetMapping(&quot;/hello&quot;)<br>    public String hello() {<br>        return &quot;Hello Spring Boot&quot;;<br>    }<br>}</pre><p>→When “/hello” is called<br> →Response sent directly to browser<br> →No HTML page, only data</p><h4>5. @RequestMapping:</h4><p>→ This annotation is used to map the request with the particular path or method inside the controller. It tells spring which URL should call which method.</p><p>→ This annotation structure contains path and method attributes inside it whereas the path tells where to map and method tells what method to execute.</p><p><strong>Example:</strong></p><pre>  @RequestMapping(path = &quot;/info&quot;, method = RequestMethod.GET)<br>  public String getUser() {<br>      return &quot;User details&quot;;<br>  }</pre><p>→ In the place of GET we can use POST, PUT, DELETE according to the usage.</p><h4>6. @GetMapping, @PostMapping, @PutMapping, @DeleteMapping:</h4><p>→ In this annotation spring listens for the requests and forwards it to the correct method.</p><p>→ If you are going to read only means then it maps the request to @GetMapping.</p><p>→ If you are going to insert a new record means it maps the request to @PostMapping.</p><p>→ Each time in the @RequestMapping annotation you need to pass the method explicitly which you are going to use. Instead of writing the methods explicitly you can directly use @PostMapping, @GetMapping, @PutMapping, and @DeleteMapping with path for the CRUD operations.</p><p>→ These annotations are shortcuts of @RequestMapping. They make the code clean and easy to understand by clearly showing with HTTP method is used.</p><p><strong>Example:</strong></p><pre>@RestController<br>@RequestMapping(&quot;/users&quot;)<br>public class UserController {<br><br>    @GetMapping(&quot;/{id}&quot;)<br>    public String getUser() {<br>        return &quot;User details&quot;;<br>    }<br><br>    @PostMapping(&quot;/add&quot;)<br>    public String addUser() {<br>        return &quot;User created&quot;;<br>    }<br><br>    @PutMapping(&quot;/update/{id}&quot;)<br>    public String updateUser() {<br>        return &quot;User updated&quot;;<br>    }<br><br>    @DeleteMapping(&quot;/delete/{id}&quot;)<br>    public String deleteUser() {<br>        return &quot;User deleted&quot;;<br>    }<br>}</pre><p><strong>How it works:</strong></p><p>→GET /users/1 → fetch user, here the 1 represents the Id</p><p>→ POST /users/add → create user</p><p>→ PUT /users/update → update user</p><p>→DELETE /users/delete/1 → delete user, here the 1 represents the Id</p><h4>7. @PathVariable:</h4><p>→ This annotation is used to read values from the URL path and pass them into a controller method.</p><p>→ It helps to receive the Id coming from the request or URL. It takes the dynamic values from the URL.</p><p><strong>Example:</strong></p><pre>@RestController<br>@RequestMapping(&quot;/users&quot;)<br>public class UserController {<br><br>    @GetMapping(&quot;/{id}&quot;)<br>    public String getUser(@PathVariable int id) {<br>        return &quot;User id is: &quot; + id;<br>    }<br>}</pre><p><strong>How it works:</strong></p><p>→ URL: /users/{id} → /users/10</p><p>→ {id}: Dynamic part of the URL</p><p>→ @PathVariable: int id gets value 10</p><p>→ getuser(): Method uses that value</p><h4>8. @RequestBody:</h4><p>→ This annotation helps to the take the JSON data sent by client and converts it into a java object. It reads the data from the HTTP request body and converts it into a java object.</p><p>→ This annotation will be mostly used in PUT and POST requests.</p><p><strong>Example:</strong></p><pre>@RestController<br>@RequestMapping(&quot;/users&quot;)<br>public class UserController {<br><br>    @PostMapping(&quot;/add&quot;)<br>    public String addUser(@RequestBody User user) {<br>        return &quot;User added: &quot; + user.getName();<br>    }<br>}</pre><p><strong>How it works:</strong></p><pre>{<br>  &quot;id&quot;: 1,<br>  &quot;name&quot;: &quot;Pravin&quot;<br>}<br>Client sends JSON </pre><p>→ @RequestBody User user maps JSON → User object.</p><h4>9. @Repository:</h4><p>→ This annotation tells spring that this particular class is going to interact with the database and fetch data from the database.</p><p>→ This class is responsible for database operations. If any exceptions occurs in the database(MongoDB, Postgresql, Mysql) it converts that exception into an Spring’s DataAccessException for consistent exception handling.</p><p><strong>Example:</strong></p><pre>@Repository<br>public interface UserRepository extends MongoRepository&lt;User, String&gt; {<br>    User findByName(String name);<br>}</pre><h4>10. @Service:</h4><p>→ When we implement business logic codes in our project we use service layer. This annotation marks the class as service layer component.</p><p>→ When we annotate a class as @Service Spring registers that class as a bean. This class does the business work between controller and repository.</p><p>→ Makes it eligible for dependency injection in other components.</p><p><strong>Example:</strong></p><pre>@Service<br>public class UserService {<br><br>    private final UserRepository userRepository;<br><br>    public UserService(UserRepository userRepository) {<br>        this.userRepository = userRepository;<br>    }<br><br>    public void addUser(User user) {<br>        userRepository.save(user); // business logic: saving user<br>    }<br><br>    public List&lt;User&gt; getAllUsers() {<br>        return userRepository.findAll();<br>    }<br>}</pre><p>→ When you want a layer between controller and repository you can use @Service layer.</p><h4>11. @AutoWired:</h4><p>→ This annotation automatically injects required dependencies from the spring context.</p><p>→ Spring will automatically provide the required object for you. Define service in the controller (service automatically get injected when you run your application → Spring will do for us).</p><p>→ Inorder to inject manually use @AutoWired then the spring will inject the needed dependency.</p><p><strong>Example:</strong></p><pre>@Service<br>public class UserService {<br><br>    @Autowired<br>    private UserRepository userRepository; <br><br>    public void addUser(User user) {<br>        userRepository.save(user);<br>    }<br>}</pre><p>→ It avoids manual creation of objects.</p><h4>12. @Component:</h4><p>→ This spring annotation is used to mark a class as a Spring-managed bean.<br> It tells Spring that, This class is a component. Please create an instance and manage it.</p><p>→ Spring will automatically create an object of this class and manage it for you.</p><p><strong>Example:</strong></p><pre>@Component<br>public class MyComponent {<br><br>    public void sayHello() {<br>        System.out.println(&quot;Hello from MyComponent&quot;);<br>    }<br>}</pre><p>→ Using @Component in another class:</p><pre>@Service<br>public class MyService {<br><br>    private final MyComponent myComponent;<br><br>    @Autowired<br>    public MyService(MyComponent myComponent) {<br>        this.myComponent = myComponent; // injected automatically<br>    }<br><br>    public void greet() {<br>        myComponent.sayHello();<br>    }<br>}</pre><p>That’s it readers, I hope this blog will be useful.</p><p>Happy Learning……!</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><p><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1eaa2894c4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SOLID Principles — Write a clean and maintainable java code]]></title>
            <link>https://medium.com/@pravinmuruganantham123/solid-principles-write-a-clean-and-maintainable-java-code-abea433a3205?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/abea433a3205</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 14:43:25 GMT</pubDate>
            <atom:updated>2026-01-07T14:43:25.497Z</atom:updated>
            <content:encoded><![CDATA[<h3>SOLID Principles — Write a clean and maintainable java code</h3><p>Hello readers, Today I explored an interesting topic named SOLID principles which will help the developers to write clean, readable and maintainable code. Instead of just writing code that works, SOLID principles helps us to write code that is structured and future-ready. In this blog, I’m sharing my understanding of the meaning of SOLID principles and how each principle helps in writing better and more reliable software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MxInj3gccrg-cuxFxApWQg.jpeg" /><figcaption>SOLID Principles</figcaption></figure><ol><li><strong>S — Single Responsibility Principle</strong></li><li><strong>O — Open/Closed Principle</strong></li><li><strong>L — Liskov Substitution Principle</strong></li><li><strong>I — Interface Segregation Principle</strong></li><li><strong>D — Dependency Inversion Principle</strong></li></ol><h4>1.Single Responsibility Principle:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4EDfQTMQX16D4G0nZ_FAg.jpeg" /><figcaption>Single Responsibility Principle (SRP)</figcaption></figure><p>→It states that a class should have only one responsibility and should focus on only one job. If a class handles multiple tasks changing one task may affect other tasks and that makes the code hard to maintain.</p><p>→In a software product either a component or class should always handle a single responsibility and it should not handle multiple responsibility.</p><p><strong>→One class → One Responsibility → One reason to change.</strong></p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qt1LnrKEK6jcOwLGnL1gSw.jpeg" /><figcaption>Wrong way which violates SRP.</figcaption></figure><p>→In the above picture a single invoice class is doing many tasks like creating invoice, calculating tax, printing invoice, emailing invoice and archiving the invoice. This violates the single responsibility principle because one class has multiple responsibilities. If any one feature changes (for example, tax calculation) the same class must be modified. This makes the code hard to maintain and risky to change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8tncE5CoHGBBFEXMqoD0Kw.jpeg" /><figcaption>Correct way which follows SRP</figcaption></figure><p>→In the above picture the responsibilities are separated into different classes. TaxCalculator calculates tax, InvoicePrinter prints the invoice, Mailer sends the invoice by mail etc… Hence now each class has only one responsibility and one reason to change.</p><h4>2.Open/Closed Principle:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsFEc0icLzZ_t9QyUR6eBA.jpeg" /><figcaption>Open/Closed Principle</figcaption></figure><p>→The open/closed principle states that software entities like classes, methods and modules should be open for extension and closed for modification.</p><p>→When a new feature is added in the software, you should not modify the existing code instead you need to write a new code or you can extend it using interfaces, abstract classes, or inheritance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3NACqVlDF8ZcBwC-EhHxJg.jpeg" /></figure><p>→For every new feature if you modify the existing code, it makes the application design complex.</p><p><strong>→Try not to change the tested code instead extends it.</strong></p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*yDiDQO3K8pGgdVmpL4yf1A.png" /><figcaption>Not following Open/Closed Principle</figcaption></figure><p>Problem: If you want to add multiply, you must change this class.<br> So this class is not closed for modification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*OUgfqRhD_Jcz4RJafzwRaw.png" /><figcaption>Follows Open/Closed Principle</figcaption></figure><p>New operations can be added by creating new classes, without changing the Calculator class. This follows the Open/Closed Principle.</p><h4>3.Liskov Substitution Principle:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FagLADHMQJyFZG4B.png" /></figure><p>→Liskov substitution principle states that the subclass object should have ability to replace its parent class without breaking the program.</p><p>→The functionality in parent class should be supported by child class.</p><p><strong>→The subclass can ENHANCE the functionality of parent class but it should not REDUCE it.</strong></p><p>→For example if a superclass supports three functionalities then the subclass also supports three functionalities.</p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*R_-gSDd5K3rwxxw4qxK3MA.png" /><figcaption>Violating Liskov Substitution Principle</figcaption></figure><p>Reason: Ostrich is a bird but it can’t fly like other birds hence if Ostrich replaces Bird the program will break.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*CnlvCvHBaUD58q91iwn69A.png" /><figcaption>Follows Liskov Substitution Principle</figcaption></figure><p>Reason: Sparrow can fly and Ostrich does not fly hence no subclass breaks parent behavior.</p><p>→ Hence dont force a child class to do something it can’t and design the parent classes in a way that all child classes can replace parent classes in a safer way.</p><h4>4.Interface Segregation Principle:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KqNaBHHAci5pMgz-.png" /><figcaption>Interface Segregation Principle</figcaption></figure><p>→ Interface Segregation Principle states that a class should not be forced to implement methods it does not use.</p><p>→ While designing a interface in a software, that interface should contain the methods which was exactly needed by the clients.</p><p>→ FAT Interfaces (The methods that are unwanted or not needed for clients) should be avoided.</p><p>→ Instead of creating one big interface, create small and specific interfaces. Classes should implement only what they actually need.</p><p><strong>→ Many small interfaces are better than one large interface.</strong></p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MoYBkLPGyXjTxyl3pukcsw.jpeg" /><figcaption>Violating ISP vs Following ISP</figcaption></figure><p><strong>In bad design:</strong> There is two classes in bad design namely AndroidComponent class and DesktopComponent class. Both classes implements the Component interface. But in DesktopComponent the touch() and swipe() method cannot be supported. As the DesktopComponent implementing the Component interface those two methods were unwantedly inserted. Hence that desktop class contains this unwanted methods always which should be strictly avoided.</p><p><strong>In good design:</strong> Here the methods are segregated according to the needs of the class. Hence the class can implements the methods which are needed and can avoid the methods which are not needed. This design is known as interface segregation design.</p><h4>5.Dependency Inversion Principle:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*dYViz9IyBBBl0zJ2.PNG" /><figcaption>Dependency Inversion Principle</figcaption></figure><p>→ The Dependency Inversion Principle states that high-level modules<strong> </strong>should not depend on low-level modules. Both should depend on abstractions (interfaces or abstract classes).</p><p>→ Your main business logic should not be tightly connected to concrete classes. Instead of directly using specific implementations, depend on interfaces.</p><p><strong>→ Depend on abstractions, not on concrete classes.</strong></p><h4>Example:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWkgwI_brAAVYT8ZiPVsiA.jpeg" /></figure><p><strong>Real-Life example:</strong></p><p><strong>Without DIP:</strong><br> A bulb is directly connected to electric wires. If you want to change the bulb type, you must change the wiring.</p><p><strong>With DIP (Good):</strong><br> A bulb is connected through a switch. You can change the bulb (LED, tube light, smart bulb) without touching the wiring.</p><p>That means, Switch is a interface here and bulb is implementation. The main system depends on switch(interface) not on bulb.</p><p>Happy Reading….</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><p><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abea433a3205" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A beginner’s guide to pom.xml and Maven]]></title>
            <link>https://medium.com/@pravinmuruganantham123/a-beginners-guide-to-pom-xml-and-maven-0c2680bc347d?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c2680bc347d</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 10:24:41 GMT</pubDate>
            <atom:updated>2026-01-05T10:24:41.062Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers, Today I explored some core concepts of Maven especially pom.xml and dependency management. I learned how Maven uses pom.xml to define project structure, manage dependencies and handle dependency scopes. Through this learning I gained a clearer understanding of how real-time Java projects are built and maintained using Maven. I’m sharing these insights here to help others who are starting their journey with Maven or want to strengthen their fundamentals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JiCmgPOhlkShN1iB.jpg" /><figcaption>pom.xml</figcaption></figure><h4>What is pom.xml?</h4><p>In pom.xml, POM stands for Project Object Model.</p><p>It is an xml configuration file that contains configuration information and maven needs to build the project. It includes dependencies, build directory, source directory, plugins etc… Before maven 2 it is project.xml after maven 2 and in maven 3 it becomes pom.xml file. Maven first reads pom.xml file and knows how to build your project.</p><p>It defines/consists:</p><ol><li>Project details (name, version)</li><li>Dependencies</li><li>Plugins</li><li>Repositories</li></ol><h4>Basic structure of pom.xml:</h4><p>&lt;project xmlns=”<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a>&quot;<br> xmlns:xsi=”<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br> xsi:schemaLocation=”<a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a><br> <a href="http://maven.apache.org/xsd/maven-4.0.0.xsd">http://maven.apache.org/xsd/maven-4.0.0.xsd</a>&quot;&gt;</p><p>&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;</p><p>&lt;groupId&gt;com.example&lt;/groupId&gt;<br> &lt;artifactId&gt;project-name&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0&lt;/version&gt;<br> &lt;packaging&gt;jar&lt;/packaging&gt;</p><p>&lt;/project&gt;</p><h4>Explanation of elements in the structure:</h4><ol><li><strong>&lt;project&gt;</strong></li></ol><p>It is a root element of pom.xml. Every maven pom should start and end with &lt;project&gt;. Without &lt;project&gt; tag maven will not recognize the file as pom.</p><p><strong>2.</strong> <strong>&lt;modelVersion&gt;</strong></p><p>It is a sub element of Project tag. It specifies the model version. It should always 4.0.0 for modern maven/java projects.</p><p><strong>3. &lt;groupId&gt;</strong></p><p>It acts like a package name in the project. It is usually written in a reverse order of a domain name for example microservices.com can be written as a com.microservices. It also helps to identify your project group in the maven repo.</p><p><strong>4. &lt;artifactId&gt;</strong></p><p>It defines the name of the project. It helps to uniquely identify a project inside a group.</p><p><strong>5. &lt;version&gt;</strong></p><p>It defines the version of the project. For example: 1.0.0-SNAPSHOT means under development.</p><p><strong>6. &lt;packaging&gt;</strong></p><p>It defines what type of output file maven should create after the build and tells maven how to package the compiled code. Common &lt;packaging&gt; types are jar, war and pom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPwmFx6BCyasjCKF3sDr-A.jpeg" /></figure><h4>What is Maven?</h4><p>Maven is a build tool which is used to handle and manage the dependencies in the pom.xml file.</p><p><strong>what is build tool?</strong></p><p>Whenever you are creating or building a java project/application there are are many steps involved in the entire process from building it to going end. Here Maven provides all of that process. That’s why maven is a build tool model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/0*RMopobgm356nI165.png" /><figcaption>Maven</figcaption></figure><p>What maven do → Maven helps to manage dependencies.</p><h4>What are dependencies?</h4><p>Dependencies are external libraries that your project or application needs to compile, run and test. Which means our java project is dependent on other libraries and some jar files. Instead of manually downloading external libraries and jar files maven will automatically downloads and manages them using pom.xml.</p><p><strong>Dependency syntax:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*o54HIk1psbYfn77rAjcnVA.png" /><figcaption>Basic dependency syntax</figcaption></figure><h4>How maven handle dependencies? (Internal working of Maven)</h4><p>A developer mentions all the required dependencies in the pom.xml file. This pom.xml file is an input or instruction file to the maven.</p><p><strong>Step 1:</strong> “mvn install” this command reads the dependencies in the pom file.</p><p><strong>Step 2: </strong>It checks whether the dependencies are available at the local repository(/home/user/.m2) or not.</p><p><strong>Step 3:</strong> If it is not available in the local repo then Maven downloads the dependencies from the Maven remote repository(<a href="https://mvnrepository.com/">https://mvnrepository.com/</a>) through the internet.</p><p><strong>Step 4:</strong> After downloading it will save in the local repository(.m2 folder).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKXya0R_I1SfOkapGprUZg.jpeg" /><figcaption>Working of maven</figcaption></figure><h4>Dependency scope in Maven(pom.xml):</h4><p>Like variables dependencies also have scope. Dependency scope defines when and where a dependency is available in the Maven. Scope tells Maven how long a dependency should be used.</p><h4>Common dependency scopes:</h4><ol><li><strong>compile:</strong> It is a default scope used in all phases.</li><li><strong>provided:</strong> Required at compile time and not included in the final artifact.</li><li><strong>runtime:</strong> Required only at runtime not at compile time.</li><li><strong>test:</strong> Available only during testing and not included at final build.</li><li><strong>system:</strong> Dependency provided manually via file path not downloaded by maven.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c2680bc347d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create Custom Annotations in Java (Simple & Clear Explanation)]]></title>
            <link>https://medium.com/@pravinmuruganantham123/how-to-create-custom-annotations-in-java-simple-clear-explanation-772f141348d6?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/772f141348d6</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Sat, 29 Nov 2025 09:12:29 GMT</pubDate>
            <atom:updated>2025-11-29T09:12:29.842Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers today I have learnt an interesting topic named Custom annotations. In this blog we are going to explore one of the most useful features in Java which is named custom annotations. If you’ve seen annotations like @Override or @Service and wondered how to create your own, this blog will guide you through it in a clear and easy way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pXEF_ZbWnlwP-hAlcbfcng.png" /><figcaption>Custom Annotations</figcaption></figure><h3>Introduction</h3><p>Let us know What is meant by annotation first, Annotations is a set of information that you can directly put into a java code. It will not directly affect the code that you annotate. In spring boot annotations means a special type of metadata that can be added above classes, variables, methods to instruct the spring what the class or method should do and how to behave.</p><h3>What is custom annotation?</h3><p>A custom annotation is an annotation which will be created by our own to serve our own purpose in the java code. It allows us to add additional information to the class, methods and variables. In simple words, A custom annotation is your own rule inside a java code according to your need.</p><h4>We usually create custom annotations when:</h4><ol><li>we want to reduce repeated code.</li><li>we want a clean and readable code</li><li>we want to create our own logic and validation</li></ol><h3>How to create a custom annotation?</h3><p>A custom annotation is created using @interface keyword. Annotation creation is similar to class creation. Usually in java how we create class…</p><p><strong>Example</strong>: public class className{</p><p>} This is how we create a class.</p><p>To create annotation you just need to replace the class with @interface keyword.</p><p><strong>Example:</strong> public @interface annotationName {</p><p>}This is how you need to create an annotation.</p><p>While creating a custom annotation two annotations need to be added.</p><p><strong>They are:</strong> @Retention and @<a href="https://medium.com/u/09980f5ad320">Target</a></p><p>These two are the common meta annotation you need to use while creating your own annotation.</p><p>//creating own annotation</p><p>@Retention(RetentionPolicy.RUNTIME)<br>@Target(ElementType.METHOD)<br>public @interface MyAnnotation {<br><br>}</p><h4>1.@Retention</h4><p>It is used to specify how long your custom annotation should be available in the application. This @<a href="https://medium.com/u/2e6bfb85916">Retention</a> works with RetentionPolicy. In the place of RUNTIME you can also use SOURCE and CLASS.</p><p>→ RetentionPolicy.SOURCE<em> </em>: Annotation is kept only in source code, removed during compilation.</p><p>→RetentionPolicy.CLASS : Stored in .class files, but not available at runtime.</p><p>→RetentionPolicy.RUNTIME : Annotation is kept in source code, class file,<strong> </strong>and runtime, so the annotation will be available while the program runs.</p><h4>2.@Target</h4><p>This annotation allows you specify that in which kind of java element that this annotation is going to be used on. If you want to use this annotation only inside a class then you need to use @Target(ElementType.TYPE). This refers that this annotation can be only used in classes.</p><p>→ElementType.METHOD : Used on methods.</p><p>→ElementType.FIELD : Used on variables.</p><p>→ElementType.CONSTRUCTOR : Used on constructors.</p><h3>How to Use the Custom Annotation?</h3><p>After creating a custom annotation you can use it in a method, class, variables etc… Here we have created a annotation that to be used on Methods. Lets see how to use our own annotation.</p><p>//using custom annotation on method</p><p>public class Example{</p><p>@MyAnnotation(value = “Running Display Method”)<br> public void display() {<br> System.out.println(“Inside display method”);<br> }<br>}</p><p>Here @MyAnnotation is used on the method named display.</p><h3>Use cases</h3><p>Custom annotations are extremely helpful in modern Java applications. Some common uses are:</p><h4>1. Custom validation:</h4><p>You can create custom annotations to validate fields automatically. They helps to check user input automatically without writing repetitive validation code.</p><p><strong>Example:</strong></p><p>@NotEmpty <br>String username;</p><p>This annotation can be used to check whether username is empty before saving or processing data.</p><h4>2. Logging:</h4><p>This is used to measure execution time and log method calls.</p><p><strong>Example:</strong></p><p>@LogExecutionTime<br>public void processData() {<br> // logic<br>}</p><p>When the program runs this annotation measures the time taken by the method to execute.</p><h4>3. Method-level control:</h4><p>You can create annotations to allow only certain users or conditions to execute a method.</p><p><strong>Example:</strong></p><p>@AdminOnly<br>public void deleteUser() {<br> // logic<br>}</p><p>Before running the deleteUser() method your program checks if the current user is an admin or not (Can be used for security purpose).</p><p>That’s all about creating a custom annotations in java. I hope that this blog will guide and help you to learn new things in java which will be helpful for improving your technical knowledge.</p><p>Happy Reading…..</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><p><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=772f141348d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The boy who walked alone to the victory]]></title>
            <link>https://medium.com/@pravinmuruganantham123/the-boy-who-walked-alone-to-the-victory-8cfba9d7f987?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cfba9d7f987</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Thu, 21 Aug 2025 17:57:10 GMT</pubDate>
            <atom:updated>2025-08-21T17:57:10.015Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers,</p><p>Today I’m going to share a motivational story and I’m sure that this story will definitely motivates you to lead a good life and right path to your success.</p><p>There was a 10-year old boy whose name is Siva. Siva depends on his father for everything in his life. His father name was Dharmaraj. Dharmaraj was a middle aged man who was working as a driver to run his family. Siva was well and good at carrom and also he was very fond of playing carrom. His father noticed that he was good at playing carrom. So he used bring him and get him to all the carrom tournaments. It’s not matter that whenever and wherever the tournament was conducted Siva’s father never hesitate to go with him to the matches. During those days Siva has never faced any struggles and hurdles except the opponent that he had faced in a match. But while he pursuing his 5th standard his father was passed away because of kidney failure. After his father was passed away he faced a major setback in his life.</p><p>He faced so many struggles because he has lived his life under the guidance of his father. Still Siva need to continue his carrom. Siva’s mother was a brave and hardworking women who needs to go work daily to run his family. As a single parent she has faced so many struggles. She was afraid about Siva’s future so she advised him to give up his sports especially Carrom. Eventhough Siva’s mom knows that he was a good carrom player but due to the situations in Siva’s family she refused him to play carrom matches. Siva was really heartbroken but he quietly kept his love for carrom alive in his heart.</p><p>One day he heard about a carrom tournament being held at Rotary club in Dindigul , which was conducted by a famous person in carrom field named Mr.Praveen Selva Kumar sir who has helped many childrens to showup their skills in carrom. Siva decided to participate in that tournament. But Siva was afraid to ask permission to his mom. He knows that his mother will definitely not allow him lonely to the tournament. So he decided not to ask permission from his mother. The tournament day was came. As usual he got ready for the school and told bye to his mother and went to school. When he reached his school he had idea that if he asks his PT sir fot getting him to the tournament place. He asked him but he restricted and told him to not to participate in the tournament due to his personal reasons. So he himself decided to go alone. He Started walking from his school gate by only knowing the Name of the place where the tournament is going to be held.</p><p>He didn’t know the route, had no one to guide him, and no money for transport. But <strong>his determination was stronger than his problems</strong>. He asked strangers along the way for directions and walked almost 6 to 7 kilometers to reach that club. When he arrived there, he saw other participants are being encouraged by their parents and guided by their coaches. Siva was the only boy who stands there alone, no coach, no parent, no supporter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*sNrCUIdzGOCPFjiRdA9CeQ.jpeg" /></figure><p><strong>But the boy had something even more powerful: confidence in himself. </strong>Siva went to the admin of the tournament to register his name. But there also unfortunately he faced a problem that he can’t able to participate in under-12 category because the commitee members had already made a fixtures for that category. So the commitee members advised him to participate in the Under-14 category where all the competitors of him will be elder than him. By knowing that Siva had registered his name in that category. Despite of everything he played with full focus and won all the league matches and qualified for the elimination and won that after that went to semi-final. In semis Siva had beaten a big player in that tournament and Siva won the semis and went to final. But in final he has lost to a boy. He secured a 2nd prize in that tournament.</p><p>On that day Siva proved something important that — <strong>“Victory doesn’t depends on who stands beside you, it mainly depends upon the courage and confidence that you have in yourself”.</strong></p><p>Happy reading….!</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cfba9d7f987" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservices]]></title>
            <link>https://medium.com/@pravinmuruganantham123/microservices-cfd7d2a22e06?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfd7d2a22e06</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 18:27:25 GMT</pubDate>
            <atom:updated>2025-08-04T18:27:25.891Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers,</p><p>Today I’m going to share about my learning about the microservices. Before we start with microservices we need to know about the monolithic architecture. A monolithic architecture is a traditional software development model that uses one code base to perform multiple business functions of the application. All the software components in a monolithic system are interdependent due to the data exchange mechanisms within the system. If there was any error happens in any of the part of the code or services then the whole application will won’t work properly hence to handle this kind of problems Microservices are used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*CGUk3kAg3IoWFxL9HTwgBA.png" /></figure><p>Let us start with a simple definition about the microservices. Microservices means splitting of one application into several services such as login service, cart service, product service, payment service etc…. Due to this kind of splitting the users can use the application efficiently. If there was a error in the cart service except cart page the other pages in the website or application will work properly.</p><p><strong>How microservices will work?</strong></p><ol><li><strong>Client Request:</strong> Here client represents the user of the application or browser. The user sends a request to the server or system.</li><li><strong>API Gateway:</strong> The API Gateway receives the request and redirect it to the corresponding services of the request in the microservices. First the request will reach the gateway commonly then it will be redirected according to its request.</li><li><strong>Service Registry:</strong> After receiving the Request the API Gateway checks the Service registry to ensure that whether the given request matches with the available instances or not and also identify which services can handle that request.</li><li><strong>Load Balancer:</strong> If there are multiple resources at a time then the load balancer plays a crucial role in splitting the request other instances which is available currently.</li><li><strong>Microservice: </strong>The microservices processes the request from the API Gateway and performs with the required application logic.</li><li><strong>Database:</strong> For every application there will be a database here the microservices will directly communicate with the database to retrieve, update, delete the data as necessary.</li><li><strong>Client Response: </strong>Finally the API Gateway will send the response to the client after its process.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*uYrRYrx3H4RVVl2rplbOUw.png" /><figcaption>Working of Microservices</figcaption></figure><p>→Applications are divided into smaller tasks or services and each services will be focusing on specific functionalities and specific requirements according to the application.</p><p>→Different tools and technologies will be used for each services according to their performance and work loads.</p><p>→Each services will handle the particular business features or functions seperately hence the changes in one service will not affect others.</p><p><strong>Components of Microservices Architecture</strong></p><ol><li>API Gateway</li><li>Service Registry and Discovery</li><li>Load Balancer</li><li>Containerization</li><li>Database per microservice</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjmckbI9CuUblrZoCNsv9w.png" /><figcaption>Components of Microservices</figcaption></figure><p><strong>1.API Gateway:</strong></p><p>API Gateway is central point of all microservices. The request from the user will be initially received by the API gateway which guides the request to the appropriate microservice. It also act as entry point of the requests.</p><p><strong>2.Service Registry and Discovery:</strong></p><p>It keeps the addresses and port numbers of all the services and routes the request to the services based on port number and service address. It allows each microservices to communicate and interact with other microservices efficiently.</p><p><strong>3.Load Balancer:</strong></p><p>If any overload happens in the particular service then it will split those work loads into other instances and services in the application. It ensures traffic distribution and high availability.</p><p><strong>4.Containerization:</strong></p><p>Containerization will help the coders or developers to work on their specific task without involving in a whole application which may become complex for the coder. They enable consistent deployments across development, staging, and production environments, which is essential in microservices architectures. It also provides portability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hj4BsfKU2ZWFovS1tktTEA.png" /></figure><p><strong>5.Database per Microservice:</strong></p><p>Each microservices will have their own databases and it interact with the database to retrieve or update information in the database. This isolation ensures that each service can choose the most suitable database technology and tools for its needs. Benefits include autonomy, independence, and scalability. Additionally, it simplifies the database schema, making it more aligned with the microservice’s specific requirements.</p><p><a href="https://medium.com/u/6ff84f1aab3e">Dhileepan</a> Thanks for introducing me this microservices sir….</p><p><a href="https://medium.com/u/54d13afd404b">Senthil Kumar Thangavel</a></p><p>Happy reading…….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfd7d2a22e06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One step forward in your life]]></title>
            <link>https://medium.com/@pravinmuruganantham123/one-step-forward-in-your-life-0ebb59a001e8?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ebb59a001e8</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Fri, 13 Jun 2025 13:55:36 GMT</pubDate>
            <atom:updated>2025-06-13T13:55:36.590Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello readers,</p><p>In this blog I’m going to share three tips which will help you to move one step forward in your life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yipk6xfetQnZqtYYXE0TJA.jpeg" /></figure><ol><li><strong>Whatever you do give your best</strong></li></ol><p>You should grow your belief that if you do something there is no one can do that thing better than you. This trust will help you to become successful and more confident. The only way to develop this kind of belief is that do it yourself to train your mind to think that no one can do this thing better than me. Even it was a small thing or big thing that doesn’t matter here. The matter is you will do that particular thing better than anyone. “<strong>If I was a Janitor(caretaker in large buildings) I will be the best Janitor in the world”</strong> said by President Barack Obama.</p><p>2.Money Discipline</p><p>If we earn money we should save something instead of spending all the money that we have. Even we should save more money than we spent. This I was learnt from my mother. Even there was a critical situation at my home she will never stop saving money. And that even helped us in so many tough times. Some people may say that invest your money and get bigger than the investment. Don’t believe that first we need to save money then we can look about the investments. Saving money is a crucial part to place our next step in our life.</p><p>3.<strong>Have right people around you</strong></p><p>Having right people around you is important because a right person will guide you to lead a successful life. If you have the people whose mindset is always negative and bad then you will also become like those people. Having right people as friends will help you to choose right decisions and even if you was going in a wrong way to the wrong destination in your life they will definitely help you to choose the right path in your life. Sometimes or in some part of your life you may become clueless. In this kind of situations a right person will guide to the the successful path.</p><p>This was the 3 tips which will help you to move one step forward in your life.</p><p>Happy reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ebb59a001e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker]]></title>
            <link>https://medium.com/@pravinmuruganantham123/docker-9e369e709b46?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e369e709b46</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Tue, 27 May 2025 18:15:54 GMT</pubDate>
            <atom:updated>2025-05-27T18:15:54.588Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Readers,</p><p>Today I’m going to share my learning about docker. Initially the developers are found difficulty in deploying the code in other systems. Because the system configurations and the versions used may differ from one another. Hence the developed code won’t able to run on other machines such as <strong>Dev/Stable/Quality Assurance/Pilot/PROD </strong>this is the main flow of deploying the code into the server. In this flow each one will have different configurational settings. Hence the code won’t run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*_bHK1r8enh5-ZjB3t7W6IQ.png" /></figure><p>As a developer it is very difficult to deploy the application in other environments. Hence to overcome this they have introduced Docker for desktop.</p><p><strong>Installation:</strong></p><ol><li>Go to browser and search ‘docker for desktop’</li><li>Click the link from docker docs website</li><li>Download the Docker version named <br>Docker Desktop for Windows — x86_64</li><li>Set the docker application to run</li></ol><p><strong>Docker Image:</strong></p><p>The code from developers will be combined and ready as a Spring Boot application. We need to add all codings and requirements into a docker image. Docker image is an non-executable or non-runnable one which will set an environment, storage, dependencies and all other requirements for a Spring Boot application to run. The docker image will be created by using the command</p><p><strong>docker build -t &lt;image_name&gt;:&lt;tag&gt;</strong></p><p>After creating the docker image it will be a Home without any connections such as electricity, water, etc….</p><p>The docker image should be shared into a container which will give a birth to the image. Then it is completely ready for the execution. To run this we will use command</p><p><strong>docker run -p 8080:8080 &lt;image_name&gt;:&lt;tag&gt;</strong></p><p>It provides a straightforward GUI (Graphical User Interface) that lets you manage your containers, applications, and images directly from your machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n7QpTHfxhM6qVYbKYn4s0w.png" /></figure><p><strong>Why use Docker..?</strong></p><p>1.It would be consistent across Environments.</p><p>2.Mainly it is portable we can install docker in any of our machines</p><p><strong>Key concepts of Docker:</strong></p><p><strong>1.Dockerfile</strong>: A script that contains a set of instructions on how to build and run a Docker image.(Spring Boot)</p><p><strong>2.Docker Image</strong>: A snapshot of an application and its dependencies.</p><p><strong>3.Container</strong>: A running instance of an image.</p><p>Docker helps to simplify our deployment of applications into the server without any compatability issues.</p><p>Happy Reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e369e709b46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Core java to Spring Boot]]></title>
            <link>https://medium.com/@pravinmuruganantham123/core-java-to-spring-boot-fadf9b1e16d9?source=rss-1f7603b80824------2</link>
            <guid isPermaLink="false">https://medium.com/p/fadf9b1e16d9</guid>
            <dc:creator><![CDATA[Pravin]]></dc:creator>
            <pubDate>Sun, 25 May 2025 15:33:58 GMT</pubDate>
            <atom:updated>2025-05-25T16:01:55.459Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A Developer’s Roadmap:</strong></p><p>Firstly we need to learn core java to deeply dive into the learning of Spring Boot. First of all let me define what is Spring Boot. Spring Boot is java framework that simplifies the creation and deployment of java application. It provides various libraries and perfect configurations for our Product. It helps us to build and manage the web applications easily.</p><p><strong>Structure of Spring Boot:</strong></p><p>Totally there are three layers in the Spring Boot framework. There is an element called Dispatcher servlet which gets the http request from the front-end page which was initiated by a user. After recieving this dispatcher servlet only sends the request inside the layers. Let we see those three layers briefly….</p><ol><li><strong>Controller layer:</strong></li></ol><p>Controller layer is the 1st layer in Spring Boot. This layer contains the ’n’ number of controllers inside. In that controllers all are java classes. Generally we use @Rest Controller for controller layer classes. By seeing this keyword only dispatcher servlet send the request to controller layer. This layer is generally used for navigating and routing. @RequestMapping is used to maps the request to the proper controller server. From controller layer we can call the functions or classes created inside the service and repository layer. Usually in java we create an objects to call the functions inside the class but here we will use bean creation which means the object will be generated at the runtime. For that we use the keyword called @Autowired.</p><p>2.<strong>Service layer:</strong></p><p>Service layer is mainly used to write the business logic and main code which works in the web application. Here we will import a dependency named as <strong>lombok </strong>which will allow the programmer to use getter and setter methods inside our program. Using this getter and setter method we can get the input values from the user. Service layer is the intermediate layer between both Controller layer and Repository layer. We can call the classes and functions inside the Repository layer in this service layer.</p><p>3.<strong>Repository layer:</strong></p><p>This layer act as a intermediate between the database and the input values. It receives the input values in json format then maps or matches with the table in the database. It connects the back-end storage with front-end values which will be entered by the user. It generally handles the interaction with database.</p><p><strong>First step in Spring Boot:</strong></p><p>Initially we need to install Intelij IDEA for communication. Process starts at creating the Folder inside the Intelij IDEA by using spring initializer in chrome. Using spring initializer we can add dependencies whichever we want. For our project we have added a dependency named lombok for getter and setter methods then we added spring for web which will allows us to create a light weight web application. Then finally we added MongoDB for database purpose.</p><p>Firstly we have build a basic web application and runs it to see how it works. In that we have came across port numbers, IP addresses, pom.xml, postman, etc…. Port numbers are used to tell that in which port our programs runs at. IP addresses are used to define the system configurations. Then post man is an web application which can be installed or directly used in browser. In that we need to select POST, raw, java and then we need to provide the input data to be stored. By Running the main application we need to go to postman and give send. Then it will be sent to the program if is was sent correctly then it will be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aXe6MaOyhdIP5WqdPHhSFw.png" /></figure><p><strong>Core Java:</strong></p><p>In core java we have learnt about the bojo classes. Bojo classes means only declerations and function calling will be performed there. In that we initially created a bank management system with the help of our Mentor Dhilipan sir. Then he told us to create a ownly we have done it. As of now I’m happy that I have improved my knowledge towards the java by listening to the classes.</p><p>Now I’m ready to write code for bank management system with simple and optimized code. I will use getter and setter methods for sending values. Similarly we will use wrapper classes like ArrayList and HashMap to store values so it is easy for us to remove or delete values or transactions.</p><p><strong>Spring Boot:</strong></p><p>Initially there was many frameworks in java. But it all based on concentrating either only on html codes or on java codes. Hence for developers it is complex to add changes in HTML codes. Similarly front-end developers are also feel complex to change in the java coding. To overcome this Spring was introduced earlier and then it later Spring Boot was introduced and still ruling the market. In Spring Boot we create packages initially and inside each package we will create and class or interface based on the use.</p><p>As a whole it combines with Spring Boot by adding various dependencies and Implementing code in the layers…….</p><p><strong>Happy Reading….</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fadf9b1e16d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>