<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Tamilselvan K</title>
    <description>The latest articles on Forem by Tamilselvan K (@tamilselvan1812).</description>
    <link>https://forem.com/tamilselvan1812</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3115249%2F738f31ea-f759-4ce9-aa64-fdf5e633ca8b.jpg</url>
      <title>Forem: Tamilselvan K</title>
      <link>https://forem.com/tamilselvan1812</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tamilselvan1812"/>
    <language>en</language>
    <item>
      <title>Building a Full Stack User Authentication System using React, Spring Boot, and PostgreSQL</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Tue, 31 Mar 2026 11:07:24 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/building-a-full-stack-user-authentication-system-using-react-spring-boot-and-postgresql-3k9g</link>
      <guid>https://forem.com/tamilselvan1812/building-a-full-stack-user-authentication-system-using-react-spring-boot-and-postgresql-3k9g</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this blog, I will walk through how I built a full-stack User Authentication System using React for the frontend, Spring Boot for the backend, and PostgreSQL for the database.&lt;/p&gt;

&lt;p&gt;This project demonstrates a complete flow of user registration, login, and dashboard display, along with validation and login activity tracking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Frontend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;React Router&lt;/li&gt;
&lt;li&gt;Axios&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Backend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;Spring Boot&lt;/li&gt;
&lt;li&gt;Spring Data JPA&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;User Registration&lt;/li&gt;
&lt;li&gt;User Login Authentication&lt;/li&gt;
&lt;li&gt;Dashboard with User Details&lt;/li&gt;
&lt;li&gt;Client-side Form Validation&lt;/li&gt;
&lt;li&gt;REST API Integration&lt;/li&gt;
&lt;li&gt;Login Activity Tracking (Status and Timestamp)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Application Flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;User registers with username, password, name, and email&lt;/li&gt;
&lt;li&gt;Data is sent to Spring Boot backend and stored in PostgreSQL&lt;/li&gt;
&lt;li&gt;User logs in with credentials&lt;/li&gt;
&lt;li&gt;Backend validates user and records login attempt&lt;/li&gt;
&lt;li&gt;On success, frontend fetches user details&lt;/li&gt;
&lt;li&gt;Dashboard displays user information&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Frontend Implementation (React)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Form Handling
&lt;/h3&gt;

&lt;p&gt;I used React’s useState hook to manage form inputs and errors. Each input field is a controlled component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Validation
&lt;/h3&gt;

&lt;p&gt;Client-side validation ensures that users cannot submit empty fields or invalid data.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;setErrors&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;All fields are required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  API Integration
&lt;/h3&gt;

&lt;p&gt;Axios is used to communicate with the backend.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http://localhost:8080/api/login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;URLSearchParams&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Navigation
&lt;/h3&gt;

&lt;p&gt;React Router is used to navigate between pages like Register, Login, and Dashboard.&lt;/p&gt;
&lt;h2&gt;
  
  
  Backend Implementation (Spring Boot)
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Layered Architecture
&lt;/h3&gt;

&lt;p&gt;The backend follows a layered structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Controller → Handles HTTP requests&lt;/li&gt;
&lt;li&gt;Service → Contains business logic&lt;/li&gt;
&lt;li&gt;Repository → Interacts with database&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  User Registration
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;register&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;UserEntity&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;UserEntity&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setUsername&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPassword&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setEmail&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="n"&gt;userRepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;save&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;"User Registered"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Login Logic
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nf"&gt;login&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;UserEntity&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;userRepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findByUsername&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getPassword&lt;/span&gt;&lt;span class="o"&gt;().&lt;/span&gt;&lt;span class="na"&gt;equals&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"SUCCESS"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"FAILED"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;LoginEntity&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;LoginEntity&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setUsername&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setStatus&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setTime&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;LocalDateTime&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;now&lt;/span&gt;&lt;span class="o"&gt;());&lt;/span&gt;

    &lt;span class="n"&gt;loginRepo&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;save&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Login Tracking
&lt;/h3&gt;

&lt;p&gt;Each login attempt is stored with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Username&lt;/li&gt;
&lt;li&gt;Status (SUCCESS / FAILED)&lt;/li&gt;
&lt;li&gt;Timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps in tracking user activity.&lt;/p&gt;
&lt;h2&gt;
  
  
  Database Design
&lt;/h2&gt;
&lt;h3&gt;
  
  
  UserEntity
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;id&lt;/li&gt;
&lt;li&gt;username&lt;/li&gt;
&lt;li&gt;password&lt;/li&gt;
&lt;li&gt;name&lt;/li&gt;
&lt;li&gt;email&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  LoginEntity
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;id&lt;/li&gt;
&lt;li&gt;username&lt;/li&gt;
&lt;li&gt;status&lt;/li&gt;
&lt;li&gt;time&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Challenges Faced
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Managing state and validation in React&lt;/li&gt;
&lt;li&gt;Handling API communication between frontend and backend&lt;/li&gt;
&lt;li&gt;Designing clean backend architecture&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Passwords are stored in plain text&lt;/li&gt;
&lt;li&gt;No authentication mechanism like JWT&lt;/li&gt;
&lt;li&gt;No route protection&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Future Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add JWT-based authentication&lt;/li&gt;
&lt;li&gt;Encrypt passwords using BCrypt&lt;/li&gt;
&lt;li&gt;Implement protected routes&lt;/li&gt;
&lt;li&gt;Improve error handling&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This project helped me understand how frontend and backend systems work together in a full-stack application. It also improved my knowledge of API integration, state management, and backend architecture.&lt;/p&gt;

&lt;p&gt;If you are learning full-stack development, building an authentication system like this is a great way to understand real-world application flow.&lt;/p&gt;
&lt;h2&gt;
  
  
  GitHub Repository
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Tamilselvan1812" rel="noopener noreferrer"&gt;
        Tamilselvan1812
      &lt;/a&gt; / &lt;a href="https://github.com/Tamilselvan1812/37-UserAuthenticationSystem" rel="noopener noreferrer"&gt;
        37-UserAuthenticationSystem
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Full Stack User Authentication System using React, Spring Boot, and PostgreSQL
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;User Authentication System (React + Spring Boot + PostgreSQL)&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;This is a full-stack &lt;strong&gt;User Authentication System&lt;/strong&gt; that allows users to register, log in, and view their profile on a dashboard. The application is built using &lt;strong&gt;React&lt;/strong&gt; for the frontend, &lt;strong&gt;Spring Boot&lt;/strong&gt; for the backend, and &lt;strong&gt;PostgreSQL&lt;/strong&gt; for database management.&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;✅ User Registration&lt;/li&gt;
&lt;li&gt;✅ User Login Authentication&lt;/li&gt;
&lt;li&gt;✅ Dashboard with User Details&lt;/li&gt;
&lt;li&gt;✅ Client-side Form Validation&lt;/li&gt;
&lt;li&gt;✅ REST API Integration&lt;/li&gt;
&lt;li&gt;✅ Login Activity Tracking (Status + Timestamp)&lt;/li&gt;
&lt;li&gt;✅ Responsive UI with modern CSS&lt;/li&gt;
&lt;/ul&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Tech Stack&lt;/h2&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Frontend&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;React Router&lt;/li&gt;
&lt;li&gt;Axios&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Backend&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;Spring Boot&lt;/li&gt;
&lt;li&gt;Spring Data JPA&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Database&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;/ul&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Application Flow&lt;/h2&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;User registers with username, password, name, and email&lt;/li&gt;
&lt;li&gt;Data is stored in PostgreSQL via Spring Boot APIs&lt;/li&gt;
&lt;li&gt;User logs in with credentials&lt;/li&gt;
&lt;li&gt;Backend validates user and records login attempt&lt;/li&gt;
&lt;li&gt;On success, user is redirected to dashboard&lt;/li&gt;
&lt;li&gt;Dashboard displays user details&lt;/li&gt;
&lt;/ol&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Project Structure&lt;/h2&gt;

&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Frontend (React)&lt;/h3&gt;

&lt;/div&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;src/
 ├── App.jsx&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Tamilselvan1812/37-UserAuthenticationSystem" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



</description>
      <category>react</category>
      <category>springboot</category>
      <category>postgressql</category>
      <category>java</category>
    </item>
    <item>
      <title>7 Days of Java Coding Practice – My Structured Preparation Plan</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Thu, 19 Feb 2026 06:01:06 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/7-days-of-java-coding-practice-my-structured-preparation-plan-mg7</link>
      <guid>https://forem.com/tamilselvan1812/7-days-of-java-coding-practice-my-structured-preparation-plan-mg7</guid>
      <description>&lt;p&gt;Recently, I decided to strengthen my core Java problem-solving skills by practicing fundamental coding problems for seven days. Instead of randomly solving questions, I followed a structured approach covering numbers, recursion, arrays, and strings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 1 – Basic Number Problems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I started with simple number-based logic building.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reverse a Number&lt;br&gt;
Extract digits using % 10 and rebuild the number using rev * 10.&lt;br&gt;
Time Complexity: O(d)&lt;br&gt;
Space Complexity: O(1)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Palindrome Number&lt;br&gt;
Reverse the number and compare it with the original.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sum of Digits&lt;br&gt;
Extract each digit and add them until the number becomes zero.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These problems helped me understand digit extraction and number manipulation clearly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 2 – Recursion and Mathematical Concepts&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Count Digits&lt;br&gt;
Keep dividing the number by 10 until it becomes zero.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fibonacci Series&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Iterative approach – efficient, O(n)&lt;/li&gt;
&lt;li&gt;Recursive approach – simple logic but exponential complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helped me understand the difference between optimized and non-optimized solutions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Factorial&lt;br&gt;
Practiced both iterative and recursive approaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Armstrong Number&lt;br&gt;
Checked whether the sum of cubes of digits equals the original number (for 3-digit numbers).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sum of Digits Until Single Digit&lt;br&gt;
Repeatedly calculated digit sum until a single digit remains (digital root concept).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Day 3 – Prime and Special Numbers&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Check Prime Number&lt;br&gt;
Initially used O(n) approach. Later learned it can be optimized to check until square root of n.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Print Prime Numbers from 1 to 50&lt;br&gt;
Applied nested loops for prime checking.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strong Number&lt;br&gt;
Example: 145 = 1! + 4! + 5!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These problems improved my mathematical thinking and loop control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 4 – Array Basics&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Bubble Sort&lt;br&gt;
Understood how comparison-based sorting works.&lt;br&gt;
Time Complexity: O(n²)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maximum Element in Array&lt;br&gt;
Traverse and update max value.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Second Largest Element&lt;br&gt;
Maintain two variables to track first and second largest.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reverse an Array&lt;br&gt;
Printed in reverse order and also practiced swapping method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding Element in Array&lt;br&gt;
Inserted element at end and at specific position.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These strengthened my array traversal and indexing logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 5 – Array Rotations and Duplicates&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Remove Duplicates (Sorted Array)&lt;br&gt;
Used two-pointer technique.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Left Rotate by 1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right Rotate by 1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Left Rotate by K&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Understood how shifting works internally and how to improve performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 6 – String Basics&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reverse a String&lt;br&gt;
Initially used string concatenation (O(n²)).&lt;br&gt;
Later understood why StringBuilder is more efficient.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Palindrome String&lt;br&gt;
Reverse and compare using equals().&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Count Vowels&lt;br&gt;
Traversed each character and checked conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Character Frequency&lt;br&gt;
Used frequency array of size 256.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This day helped me understand string immutability and character handling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 7 – Advanced String Problems&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Anagram&lt;br&gt;
Incremented frequency for first string and decremented for second.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First Non-Repeating Character&lt;br&gt;
Used frequency count and scanned again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check Unique Characters&lt;br&gt;
Ensured no character appears more than once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reverse Each Word in a Sentence&lt;br&gt;
Split sentence and reversed each word individually.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These problems improved my confidence in solving string-based interview questions.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Improved logical thinking&lt;/li&gt;
&lt;li&gt;Better understanding of time and space complexity&lt;/li&gt;
&lt;li&gt;Learned difference between brute force and optimized approach&lt;/li&gt;
&lt;li&gt;Strengthened recursion basics&lt;/li&gt;
&lt;li&gt;Practiced two-pointer technique&lt;/li&gt;
&lt;li&gt;Improved confidence in writing clean Java code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of solving hundreds of random problems, I focused on mastering around 30 fundamental problems deeply. That gave me much more clarity and confidence.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>java</category>
      <category>coding</category>
    </item>
    <item>
      <title>What I Covered in the Last Two Months After My First Full-Stack Project</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Wed, 04 Feb 2026 05:19:54 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/what-i-covered-in-the-last-two-months-after-my-first-full-stack-project-18ek</link>
      <guid>https://forem.com/tamilselvan1812/what-i-covered-in-the-last-two-months-after-my-first-full-stack-project-18ek</guid>
      <description>&lt;p&gt;Two months ago, I published a blog about my Student Management System, which was my first complete full-stack project. After completing that project, I continued learning consistently and focused on improving my understanding of both frontend and backend development.&lt;/p&gt;

&lt;p&gt;This post is a summary of what I covered during the last two months and how my learning progressed after building my first full-stack application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frontend Development
&lt;/h2&gt;

&lt;p&gt;During the last two months, I spent time strengthening my frontend fundamentals and improving my React skills.&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics covered
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;HTML for semantic structure and better readability&lt;/li&gt;
&lt;li&gt;CSS for layouts, responsiveness, and UI improvements&lt;/li&gt;
&lt;li&gt;JavaScript for logic building and DOM manipulation&lt;/li&gt;
&lt;li&gt;React for component-based UI development&lt;/li&gt;
&lt;li&gt;Small React practice programs to apply concepts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Backend Development
&lt;/h2&gt;

&lt;p&gt;Along with frontend learning, I continued working on backend development using Java and Spring Boot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics covered
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Core Java concepts and object-oriented programming&lt;/li&gt;
&lt;li&gt;Spring Boot for building RESTful APIs&lt;/li&gt;
&lt;li&gt;PostgreSQL for database connectivity and queries&lt;/li&gt;
&lt;li&gt;Backend practice projects and API testing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Full-Stack Learning Beyond My First Project
&lt;/h2&gt;

&lt;p&gt;After completing the Student Management System, I worked on another full-stack project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hotel Management System&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This project helped reinforce concepts such as CRUD operations, frontend-backend integration, and database handling. Building another full-stack application gave me more confidence in structuring applications from start to finish.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coding Practice and Consistency
&lt;/h2&gt;

&lt;p&gt;To improve my problem-solving skills, I practiced coding regularly alongside project work.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React practice programs: 5&lt;/li&gt;
&lt;li&gt;Java practice programs: 25&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Plan to Do Next
&lt;/h2&gt;

&lt;p&gt;In the coming months, I plan to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build more real-world full-stack projects&lt;/li&gt;
&lt;li&gt;Improve my React and Spring Boot skills further&lt;/li&gt;
&lt;li&gt;Focus on interview preparation&lt;/li&gt;
&lt;li&gt;Continue documenting my learning through blog posts&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>fullstack</category>
      <category>react</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Day-105 Building a Full-Stack Student Management System with React, Spring Boot, and PostgreSQL</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Fri, 17 Oct 2025 11:25:27 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/building-a-full-stack-student-management-system-with-react-spring-boot-and-postgresql-4igb</link>
      <guid>https://forem.com/tamilselvan1812/building-a-full-stack-student-management-system-with-react-spring-boot-and-postgresql-4igb</guid>
      <description>&lt;p&gt;Managing student records manually can be time-consuming — from adding new students to updating and deleting their details. This project demonstrates how to build a Student Management Web Application using React for the frontend, Spring Boot for the backend, and PostgreSQL as the database.&lt;/p&gt;

&lt;p&gt;The application performs complete CRUD operations (Create, Read, Update, Delete) with persistent data storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack Used
&lt;/h2&gt;

&lt;p&gt;Frontend : React (JavaScript)&lt;br&gt;
Backend  : Spring Boot (Java)&lt;br&gt;
Database : PostgreSQL&lt;br&gt;
API Communication: REST API (Axios)&lt;/p&gt;
&lt;h2&gt;
  
  
  Project Goal
&lt;/h2&gt;

&lt;p&gt;To create a simple, user-friendly web app that allows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adding new student details&lt;/li&gt;
&lt;li&gt;Viewing all students in a table&lt;/li&gt;
&lt;li&gt;Editing student details&lt;/li&gt;
&lt;li&gt;Deleting student by name&lt;/li&gt;
&lt;li&gt;Storing data permanently in PostgreSQL&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;StudentManagement/
│── demo/         → Spring Boot backend
│── my-app/       → React frontend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Backend – Spring Boot + PostgreSQL
&lt;/h2&gt;

&lt;p&gt;The backend handles all data operations — fetching, adding, updating, and deleting student records.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Student Model
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Entity
public class Student {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String name;
    private int age;
    private int marks;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  2. Repository Layer
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public interface StudentRepository extends JpaRepository&amp;lt;Student, Long&amp;gt; {

    Student findByName(String name);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3. Controller Layer
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
@CrossOrigin(origins = "http://localhost:3000")
public class StudentController {

    @Autowired
    private StudentRepository repo;

    @GetMapping("/")
    public List&amp;lt;Student&amp;gt; getAllStudents() {
        return repo.findAll();
    }

    @PostMapping("/students")
    public Student addStudent(@RequestBody Student student) {
        return repo.save(student);
    }

    @PutMapping("/students/byName/{name}")
    public Student updateStudent(@PathVariable String name, @RequestBody Student updated) {
        Student s = repo.findByName(name);
        s.setName(updated.getName());
        s.setAge(updated.getAge());
        s.setMarks(updated.getMarks());
        return repo.save(s);
    }

    @DeleteMapping("/students/byName/{name}")
    public String deleteStudent(@PathVariable String name) {
        repo.deleteByName(name);
        return "Deleted successfully";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  4. Database Configuration
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;application.properties&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.show-sql=true
spring.datasource.url=jdbc:postgresql://localhost:5432/studentdb
spring.datasource.username=postgres
spring.datasource.password=your password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Frontend – React
&lt;/h2&gt;

&lt;p&gt;The React frontend provides a clean interface for managing students and interacts with the backend using Axios.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. StudentTable Component
&lt;/h3&gt;

&lt;p&gt;Displays the list of students and allows editing or deleting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function StudentTable() {
  const [students, setStudents] = useState([]);
  const navigate = useNavigate();

  const fetchStudents = () =&amp;gt; {
    axios.get("http://localhost:8080/")
      .then((res) =&amp;gt; setStudents(res.data))
      .catch((err) =&amp;gt; console.log("Error fetching students", err));
  };

  useEffect(() =&amp;gt; {
    fetchStudents();
  }, []);

  const handleDeleteByName = (name) =&amp;gt; {
    axios.delete(`http://localhost:8080/students/byName/${name}`)
      .then(() =&amp;gt; fetchStudents())
      .catch((err) =&amp;gt; console.log("Error deleting student", err));
  };

  const handleEditByName = (student) =&amp;gt; {

    navigate("/addStudent", { state: { student } });                   // Navigate to StudentForm and pass student object as state
  };

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h2&amp;gt;Student List&amp;lt;/h2&amp;gt;
      &amp;lt;button type="button" onClick={() =&amp;gt; navigate("/addStudent")}&amp;gt;Add Student&amp;lt;/button&amp;gt;

      &amp;lt;table border="1"&amp;gt;
        &amp;lt;thead&amp;gt;
          &amp;lt;tr&amp;gt;

            &amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;
             &amp;lt;th&amp;gt;Age&amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt;Marks&amp;lt;/th&amp;gt;
            &amp;lt;th&amp;gt;Action&amp;lt;/th&amp;gt;
          &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
          {students.map((s) =&amp;gt; (
            &amp;lt;tr key={s.id}&amp;gt;

              &amp;lt;td&amp;gt;{s.name}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{s.age}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;{s.marks}&amp;lt;/td&amp;gt;
              &amp;lt;td&amp;gt;
                &amp;lt;button type="button" onClick={() =&amp;gt; handleDeleteByName(s.name)}&amp;gt;Delete&amp;lt;/button&amp;gt;
                &amp;lt;button type="button" onClick={() =&amp;gt; handleEditByName(s)}&amp;gt;Edit&amp;lt;/button&amp;gt;
              &amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
          ))}
        &amp;lt;/tbody&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. StudentForm Component
&lt;/h3&gt;

&lt;p&gt;Used to add or edit a student record.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function StudentForm() {
  const [name, setName] = useState("");
  const [age, setAge] = useState("");
  const [marks, setMarks] = useState("");
  const navigate = useNavigate();
  const location = useLocation();
  const [oldName, setOldName] = useState(null);

  useEffect(() =&amp;gt; {
    if (location.state?.student) {
      const { student } = location.state;
      setName(student.name);
      setAge(student.age);
      setMarks(student.marks);
      setOldName(student.name);
    }
  }, [location]);

  const handleSubmit = (e) =&amp;gt; {
    e.preventDefault();
    const data = { name, age: parseInt(age), marks: parseInt(marks) };

    if (oldName)
      axios.put(`http://localhost:8080/students/byName/${oldName}`, data)
        .then(() =&amp;gt; navigate("/"));
    else
      axios.post("http://localhost:8080/students", data)
        .then(() =&amp;gt; navigate("/"));
  };

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h2&amp;gt;{oldName ? "Edit Student" : "Add Student"}&amp;lt;/h2&amp;gt;
      &amp;lt;form onSubmit={handleSubmit}&amp;gt;
        &amp;lt;input value={name} onChange={(e) =&amp;gt; setName(e.target.value)} placeholder="Name" required /&amp;gt;
        &amp;lt;input value={age} onChange={(e) =&amp;gt; setAge(e.target.value)} placeholder="Age" required /&amp;gt;
        &amp;lt;input value={marks} onChange={(e) =&amp;gt; setMarks(e.target.value)} placeholder="Marks" required /&amp;gt;
        &amp;lt;button type="submit"&amp;gt;Save&amp;lt;/button&amp;gt;
        &amp;lt;button type="button" onClick={() =&amp;gt; navigate("/")}&amp;gt;Cancel&amp;lt;/button&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How Frontend and Backend Communicate
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;React uses Axios to send HTTP requests (GET, POST, PUT, DELETE).&lt;/li&gt;
&lt;li&gt;Spring Boot exposes REST endpoints for each CRUD operation.&lt;/li&gt;
&lt;li&gt;JPA handles all database operations with PostgreSQL.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example endpoints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;POST /students → Adds a new student&lt;/li&gt;
&lt;li&gt;GET / → Fetches all students&lt;/li&gt;
&lt;li&gt;PUT /students/byName/{name} → Updates student details&lt;/li&gt;
&lt;li&gt;DELETE /students/byName/{name} → Deletes student&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Connecting React with Spring Boot using Axios&lt;/li&gt;
&lt;li&gt;Integrating PostgreSQL with JPA&lt;/li&gt;
&lt;li&gt;Implementing complete CRUD operations&lt;/li&gt;
&lt;li&gt;Understanding how REST APIs link frontend and backend&lt;/li&gt;
&lt;li&gt;Designing a clean and responsive React interface&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>react</category>
    </item>
    <item>
      <title>Day-104 Understanding JPA, Hibernate, and JpaRepository in Spring Boot</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Sat, 11 Oct 2025 03:27:55 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-104-understanding-jpa-hibernate-and-jparepository-in-spring-boot-1l04</link>
      <guid>https://forem.com/tamilselvan1812/day-104-understanding-jpa-hibernate-and-jparepository-in-spring-boot-1l04</guid>
      <description>&lt;p&gt;When working with databases in Java-based applications, managing data persistence efficiently is important. Spring Boot simplifies this process using JPA and Hibernate, making CRUD operations seamless with minimal boilerplate code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is JPA?
&lt;/h3&gt;

&lt;p&gt;JPA (Java Persistence API) is a standard specification provided by Java for Object Relational Mapping (ORM).&lt;br&gt;
It allows developers to map Java objects to database tables and perform database operations using Java code instead of SQL queries.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Features of JPA:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Defines how Java objects are stored and retrieved from relational databases.&lt;/li&gt;
&lt;li&gt;Provides annotations to map classes and fields to database tables and columns.&lt;/li&gt;
&lt;li&gt;Simplifies data access through high-level APIs.&lt;/li&gt;
&lt;li&gt;Works with different ORM providers like Hibernate, EclipseLink, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Common JPA Annotations:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@Entity&lt;/code&gt; – Marks a class as a JPA entity.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@Id&lt;/code&gt; – Defines the primary key.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@Table&lt;/code&gt; – Maps the class to a specific database table.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@Column&lt;/code&gt; – Maps a field to a table column.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is Hibernate?
&lt;/h3&gt;

&lt;p&gt;Hibernate is the implementation of the JPA specification.&lt;br&gt;
While JPA defines the rules, Hibernate provides the actual functionality to interact with the database.&lt;/p&gt;

&lt;h4&gt;
  
  
  Hibernate Features:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Implements all JPA features.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provides advanced ORM capabilities like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Caching&lt;/strong&gt; – Improves performance by reducing database hits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lazy Loading&lt;/strong&gt; – Loads related data only when required.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Allows writing queries using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JPQL (Java Persistence Query Language)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native SQL&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  JpaRepository in Spring Boot
&lt;/h3&gt;

&lt;p&gt;Spring Data JPA provides the JpaRepository interface, which extends CrudRepository and PagingAndSortingRepository.&lt;br&gt;
It comes with built-in methods for CRUD and query operations — no need to write SQL manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common JpaRepository Built-in Methods
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;save()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Insert or update an entity.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;findById()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Find an entity by its primary key.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;findAll()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Retrieve all entities.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deleteById()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete an entity using its primary key.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;delete()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Delete a specific entity.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;count()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Get total number of records.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;existsById()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Check if an entity exists by its primary key.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Custom Query Methods
&lt;/h3&gt;

&lt;p&gt;Apart from built-in methods, Spring Data JPA also allows custom query methods by following a simple naming convention.&lt;/p&gt;

&lt;h4&gt;
  
  
  Examples:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;List&amp;lt;Student&amp;gt; findByName(String name);
List&amp;lt;Student&amp;gt; findByAge(int age);
List&amp;lt;Student&amp;gt; findByNameAndMarks(String name, int marks);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spring Boot automatically generates the SQL queries for these methods based on their names.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Day-102,103 Connecting Spring Boot with PostgreSQL Database</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Wed, 01 Oct 2025 06:47:00 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-102103-connecting-spring-boot-with-postgresql-database-3nkm</link>
      <guid>https://forem.com/tamilselvan1812/day-102103-connecting-spring-boot-with-postgresql-database-3nkm</guid>
      <description>&lt;h2&gt;
  
  
  1. Add Dependencies for PostgreSQL and JPA
&lt;/h2&gt;

&lt;p&gt;In pom.xml, add the following dependencies. If you use Spring Initializr, you can directly select Spring Data JPA, PostgreSQL Driver, and Spring Web.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-starter-data-jpa&amp;lt;/artifactId&amp;gt;
&amp;lt;/dependency&amp;gt;

&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.postgresql&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;postgresql&amp;lt;/artifactId&amp;gt;
    &amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;

&amp;lt;dependency&amp;gt;
    &amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;spring-boot-starter-web&amp;lt;/artifactId&amp;gt;
&amp;lt;/dependency&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Configure Database Connection in application.properties
&lt;/h2&gt;

&lt;p&gt;Provide database connection details in the application.properties file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;spring.datasource.url=jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=postgres
spring.datasource.password=yourpassword

spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace mydb, postgres, and yourpassword with your actual PostgreSQL database name, username, and password.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Create an Entity Class
&lt;/h2&gt;

&lt;p&gt;Entities in JPA represent tables in the database. Below is a simple Student entity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.payilagam.DB_connection.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.Id;

@Entity
public class Student {

    @Id
    private int id;
    private String name;
    private int age;
    private int marks;

    public Student() {}

    public Student(int id, String name, int age, int marks) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.marks = marks;
    }

    public int getId() { return id; }
    public void setId(int id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public int getAge() { return age; }
    public void setAge(int age) { this.age = age; }

    public int getMarks() { return marks; }
    public void setMarks(int marks) { this.marks = marks; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Create a Repository Interface
&lt;/h2&gt;

&lt;p&gt;Spring Data JPA provides CRUD operations by extending jpaRepository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.payilagam.DB_connection.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import com.payilagam.DB_connection.entity.Student;

public interface StudentRepo extends JpaRepository&amp;lt;Student, Integer&amp;gt; {
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Insert Data Automatically Using a Controller
&lt;/h2&gt;

&lt;p&gt;In this example, instead of exposing REST APIs, we will insert data automatically at startup using @PostConstruct.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;package com.payilagam.DB_connection.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.payilagam.DB_connection.entity.Student;
import com.payilagam.DB_connection.repository.StudentRepo;

import jakarta.annotation.PostConstruct;

@Component
public class StudentController {

    @Autowired
    private StudentRepo studentRepo;

    @PostConstruct
    public void display() {
        Student s = new Student(1, "Tamil", 30, 95);
        studentRepo.save(s);
        System.out.println("Student saved into PostgreSQL database.");
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the Spring Boot application starts, the display() method executes automatically, creates a Student object, and saves it into the PostgreSQL database.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Run and Verify
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start PostgreSQL and ensure the database exists.&lt;/li&gt;
&lt;li&gt;Run the Spring Boot application.&lt;/li&gt;
&lt;li&gt;Check the console logs. Hibernate will generate an SQL insert statement similar to the one below:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;insert into student (age, marks, name, id) values (30, 95, 'Tamil', 1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.Verify in PostgreSQL using a query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select * from student;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the inserted student record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add dependencies for PostgreSQL and JPA&lt;/li&gt;
&lt;li&gt;Configure database connection in application.properties&lt;/li&gt;
&lt;li&gt;Create an entity class&lt;/li&gt;
&lt;li&gt;Create a repository interface&lt;/li&gt;
&lt;li&gt;Insert data automatically using @PostConstruct in a controller&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Day-100,101 19-Essential Spring Boot Annotations</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Wed, 24 Sep 2025 07:18:58 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-101-19-essential-spring-boot-annotations-232h</link>
      <guid>https://forem.com/tamilselvan1812/day-101-19-essential-spring-boot-annotations-232h</guid>
      <description>&lt;h2&gt;
  
  
  1.@SpringBootApplication
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks the main class of a Spring Boot application.&lt;/li&gt;
&lt;li&gt;Enables auto-configuration,component scanning, and configuration setup.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@SpringBootApplication
public class MyApp {
    public static void main(String[] args) {
        SpringApplication.run(MyApp.class, args);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2.@RestController
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a REST API controller.&lt;/li&gt;
&lt;li&gt;Combines @Controller + @ResponseBody, so responses are returned as JSON.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@RestController
public class HelloController {
    @GetMapping("/hello")
    public String hello() {
        return "Hello Spring Boot!";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3.@Controller
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a Spring MVC controller.&lt;/li&gt;
&lt;li&gt;Used for serving web pages or templates (like Thymeleaf).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Controller
public class PageController {
    @GetMapping("/home")
    public String homePage() {
        return "home"; // returns home.html
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4.@GetMapping
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Maps HTTP GET requests to a controller method.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@GetMapping("/users")
public List&amp;lt;User&amp;gt; getUsers() { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5.@PostMapping
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Maps HTTP POST requests to a method.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@PostMapping("/users")
public User createUser(@RequestBody User user) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6.@PutMapping
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Maps HTTP PUT requests to a method for updating resources.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@PutMapping("/users/{id}")
public User updateUser(@PathVariable Long id, @RequestBody User user) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7.@DeleteMapping
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Maps HTTP DELETE requests to a method for deleting resources.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@DeleteMapping("/users/{id}")
public void deleteUser(@PathVariable Long id) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8.@Autowired
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Automatically injects Spring-managed beans.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Autowired
private UserService userService;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9.@Service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a service layer bean containing business logic.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Service
public class UserService { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  10.@Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a data access layer (DAO).&lt;/li&gt;
&lt;li&gt;Supports exception translation for database operations.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Repository
public interface UserRepository extends JpaRepository&amp;lt;User, Long&amp;gt; { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  11.@Component
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Generic annotation for any Spring-managed bean.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Component
public class Utility { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  12.&lt;a class="mentioned-user" href="https://dev.to/entity"&gt;@entity&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a JPA entity mapping to a database table.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Entity
public class User { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  13.@ Id
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks the primary key in a JPA entity.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Id
private Long id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  14.@GeneratedValue
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Configures &lt;strong&gt;automatic generation&lt;/strong&gt; of primary key values (e.g., auto-increment).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  15.@Configuration
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Marks a class as a source of bean definitions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Configuration
public class AppConfig { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  16.@ Bean
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Declares a bean inside a configuration class; managed by Spring.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Bean
public RestTemplate restTemplate() {
    return new RestTemplate();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  17.@RequestBody
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Binds HTTP request body (JSON) to a Java object.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@PostMapping("/users")
public User createUser(@RequestBody User user) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  18.@PathVariable
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Binds a URI path variable to a method parameter.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@GetMapping("/users/{id}")
public User getUser(@PathVariable Long id) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  19.@RequestParam
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Binds query parameters or form data to a method parameter.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@GetMapping("/users")
public List&amp;lt;User&amp;gt; getUsers(@RequestParam int page, @RequestParam int size) { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;For freshers, mastering these 19 annotations is enough to handle most Spring Boot interview questions. They cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application setup&lt;/li&gt;
&lt;li&gt;REST controllers&lt;/li&gt;
&lt;li&gt;Dependency injection&lt;/li&gt;
&lt;li&gt;Service &amp;amp; repository layers&lt;/li&gt;
&lt;li&gt;JPA / database mapping&lt;/li&gt;
&lt;li&gt;Request handling&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Day-99 Multithreading in Java</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Tue, 23 Sep 2025 09:19:35 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-99-multithreading-in-java-iik</link>
      <guid>https://forem.com/tamilselvan1812/day-99-multithreading-in-java-iik</guid>
      <description>&lt;p&gt;Multithreading is the process of executing multiple threads simultaneously.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A thread is the smallest unit of execution.&lt;/li&gt;
&lt;li&gt;Java provides strong multithreading support via the Thread class and Runnable interface.&lt;/li&gt;
&lt;li&gt;It helps in better CPU utilization and improved application performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ways to Create a Thread
&lt;/h2&gt;

&lt;p&gt;There are two main ways to create a thread in Java:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;a) Extending the Thread Class&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyThread extends Thread {
    public void run() {
        System.out.println("Thread running using Thread class!");
    }
}

public class ThreadDemo {
    public static void main(String[] args) {
        MyThread t1 = new MyThread();
        t1.start(); // Start the thread
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;b) Implementing the Runnable Interface&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class MyRunnable implements Runnable {
    public void run() {
        System.out.println("Thread running using Runnable interface!");
    }
}

public class RunnableDemo {
    public static void main(String[] args) {
        Thread t1 = new Thread(new MyRunnable());
        t1.start();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Thread Lifecycle
&lt;/h2&gt;

&lt;p&gt;A thread passes through these states:&lt;/p&gt;

&lt;p&gt;New → Runnable → Running → Waiting → Terminated&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New: Thread object created but not started.&lt;/li&gt;
&lt;li&gt;Runnable: Thread is ready to run but waiting for CPU scheduling.&lt;/li&gt;
&lt;li&gt;Running: Thread is currently executing.&lt;/li&gt;
&lt;li&gt;Waiting/Timed Waiting: Thread is paused temporarily.&lt;/li&gt;
&lt;li&gt;Terminated: Thread has finished execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Common Thread Methods
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;start() → begin thread execution&lt;/li&gt;
&lt;li&gt;run() → contains the logic of the thread&lt;/li&gt;
&lt;li&gt;sleep(ms) → pause thread for given milliseconds&lt;/li&gt;
&lt;li&gt;join() → wait for a thread to finish&lt;/li&gt;
&lt;li&gt;isAlive() → check if thread is running&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Synchronization
&lt;/h2&gt;

&lt;p&gt;When multiple threads access a shared resource, race conditions may occur.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;synchronized keyword ensures that only one thread can access a resource at a time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Threads allow concurrent execution.&lt;/li&gt;
&lt;li&gt;Two ways to create threads: Thread class &amp;amp; Runnable interface.&lt;/li&gt;
&lt;li&gt;Use synchronization to prevent race conditions.&lt;/li&gt;
&lt;li&gt;Multithreading is widely used in games, web servers, and real-time applications.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
    </item>
    <item>
      <title>Day-98 Java 8 Features – Functional Interfaces, Lambda Expressions &amp; Streams</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Tue, 23 Sep 2025 09:15:34 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-98-java-8-features-functional-interfaces-lambda-expressions-streams-1b3</link>
      <guid>https://forem.com/tamilselvan1812/day-98-java-8-features-functional-interfaces-lambda-expressions-streams-1b3</guid>
      <description>&lt;p&gt;Java 8 introduced functional programming concepts to the language, making code more concise, readable, and powerful. Three of the most important features are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Functional Interfaces&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lambda Expressions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Streams API&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Functional Interfaces
&lt;/h2&gt;

&lt;p&gt;A functional interface is an interface with a single abstract method (SAM).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They enable lambda expressions and method references.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Common functional interfaces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Predicate → test a condition&lt;/li&gt;
&lt;li&gt;Consumer → consume input&lt;/li&gt;
&lt;li&gt;Function → transform input&lt;/li&gt;
&lt;li&gt;Supplier → provide values&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Code – Functional Interface
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class FunctionalInterfaceDemo {

    public static void main(String[] args) {

        Predicate&amp;lt;Integer&amp;gt; isEven = n -&amp;gt; n % 2 == 0;

        System.out.println(isEven.test(10));        // true
        System.out.println(isEven.test(15));        // false
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lambda Expressions
&lt;/h2&gt;

&lt;p&gt;A lambda expression is a short way to represent an anonymous function.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It reduces boilerplate code.&lt;/li&gt;
&lt;li&gt;Syntax:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  (parameters) -&amp;gt; expression  
  (parameters) -&amp;gt; { statements }  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Code – Lambda Expression
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class LambdaDemo {
    public static void main(String[] args) {
           List&amp;lt;String&amp;gt; names = new ArrayList&amp;lt;&amp;gt;();
           names.add("Alice");
           names.add("Bob");
           names.add("Charlie");

           System.out.println(names); 


      names.forEach(name -&amp;gt; System.out.println(name.toUpperCase()));   // Iterate using forEach and lambda
       }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Streams API
&lt;/h2&gt;

&lt;p&gt;A Stream is a sequence of elements supporting functional-style operations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used for filtering, mapping, reducing, and collecting data.&lt;/li&gt;
&lt;li&gt;Works with collections easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common Methods:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;filter() – filter elements by condition&lt;/li&gt;
&lt;li&gt;map() – transform elements&lt;/li&gt;
&lt;li&gt;forEach() – iterate elements&lt;/li&gt;
&lt;li&gt;collect() – gather results into List/Set/Map&lt;/li&gt;
&lt;li&gt;reduce() – combine into a single result&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Example Code – Streams
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class StreamsDemo {
    public static void main(String[] args) {

        List&amp;lt;Integer&amp;gt; numbers = new ArrayList&amp;lt;&amp;gt;();
        numbers.add(1);
        numbers.add(2);
        numbers.add(3);
        numbers.add(4);
        numbers.add(5);
        numbers.add(6);


        List&amp;lt;Integer&amp;gt; result = numbers.stream()
                                      .filter(n -&amp;gt; n % 2 == 0)           // Filter even numbers
                                      .map(n -&amp;gt; n * 2)                   //  double them
                                      .collect(Collectors.toList());     // collect to a new list

        System.out.println(result); 
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Functional Interfaces allow concise coding patterns.&lt;/li&gt;
&lt;li&gt;Lambdas replace anonymous classes with cleaner syntax.&lt;/li&gt;
&lt;li&gt;Streams bring the power of functional programming to data processing.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
    </item>
    <item>
      <title>Day-97 Stack &amp; Queue in Java</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Tue, 23 Sep 2025 09:10:23 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-97-stack-queue-in-java-1mab</link>
      <guid>https://forem.com/tamilselvan1812/day-97-stack-queue-in-java-1mab</guid>
      <description>&lt;h4&gt;
  
  
  &lt;strong&gt;1. Stack (LIFO – Last In, First Out)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A Stack follows the principle of Last In, First Out (LIFO).&lt;/li&gt;
&lt;li&gt;Think of a stack of plates: the last plate placed on top is the first one to be removed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Methods in Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;push() – add an element&lt;/li&gt;
&lt;li&gt;pop() – remove top element&lt;/li&gt;
&lt;li&gt;peek() – see top element without removing&lt;/li&gt;
&lt;li&gt;isEmpty() – check if stack is empty&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Code (Stack Demo):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.Stack;

public class StackDemo {
    public static void main(String[] args) {
        Stack&amp;lt;Integer&amp;gt; stack = new Stack&amp;lt;&amp;gt;();

        stack.push(10);
        stack.push(20);
        stack.push(30);

        System.out.println("Top element: " + stack.peek()); // 30
        System.out.println("Removed: " + stack.pop()); // 30
        System.out.println("Is stack empty? " + stack.isEmpty());
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;strong&gt;2. Queue (FIFO – First In, First Out)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A Queue follows the principle of First In, First Out (FIFO).&lt;/li&gt;
&lt;li&gt;Think of a ticket counter queue: the first person in line is the first to be served.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common Methods in Queue:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;offer() – add element&lt;/li&gt;
&lt;li&gt;poll()  – remove front element&lt;/li&gt;
&lt;li&gt;peek()  – see front element&lt;/li&gt;
&lt;li&gt;isEmpty() – check if queue is empty&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Code (Queue Demo):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import java.util.LinkedList;
import java.util.Queue;

public class QueueDemo {
    public static void main(String[] args) {
        Queue&amp;lt;Integer&amp;gt; queue = new LinkedList&amp;lt;&amp;gt;();

        queue.offer(10);
        queue.offer(20);
        queue.offer(30);

        System.out.println("Front element: " + queue.peek()); // 10
        System.out.println("Removed: " + queue.poll()); // 10
        System.out.println("Is queue empty? " + queue.isEmpty());
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Stack is best when you need reverse order processing (Undo operations, DFS, expression evaluation).&lt;/li&gt;
&lt;li&gt;Queue is best when you need sequential order processing (Task scheduling, BFS, request handling).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
    </item>
    <item>
      <title>Day-96 Inversion of control(IOC) and Dependency Injection in Spring</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Sat, 20 Sep 2025 11:07:47 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-96-inversion-of-controlioc-and-dependency-injection-in-spring-34g</link>
      <guid>https://forem.com/tamilselvan1812/day-96-inversion-of-controlioc-and-dependency-injection-in-spring-34g</guid>
      <description>&lt;h2&gt;
  
  
  What is Inversion of Control (IoC)?
&lt;/h2&gt;

&lt;p&gt;Inversion of Control is a design principle where the control of object creation and dependency management is transferred from the application code to a container or framework.  &lt;/p&gt;

&lt;p&gt;In Spring, this container is called the IoC Container, which comes in two forms:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;BeanFactory (basic)
&lt;/li&gt;
&lt;li&gt;ApplicationContext (advanced, with additional features)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Dependency Injection (DI)?
&lt;/h2&gt;

&lt;p&gt;Dependency Injection is one way of implementing IoC.  &lt;/p&gt;

&lt;p&gt;Instead of objects creating their own dependencies, the Spring container injects the required dependencies into them.  &lt;/p&gt;

&lt;p&gt;This makes the code:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loosely Coupled → Easier to maintain and extend.
&lt;/li&gt;
&lt;li&gt;Testable → Since dependencies can be mocked or swapped easily.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Dependency Injection in Spring
&lt;/h2&gt;

&lt;p&gt;Spring provides three main types of DI:  &lt;/p&gt;

&lt;h3&gt;
  
  
  Constructor Injection
&lt;/h3&gt;

&lt;p&gt;Dependencies are provided through a class constructor. Best for mandatory dependencies.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Setter Injection
&lt;/h3&gt;

&lt;p&gt;Dependencies are set through setter methods. Useful for optional dependencies.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Field Injection
&lt;/h3&gt;

&lt;p&gt;Dependencies are injected directly into class fields using annotations like @Autowired. Convenient, but less preferred in large applications.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Using DI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Reduces boilerplate code for object creation.
&lt;/li&gt;
&lt;li&gt;Promotes loose coupling.
&lt;/li&gt;
&lt;li&gt;Simplifies unit testing with mock dependencies.
&lt;/li&gt;
&lt;li&gt;Improves maintainability and readability.
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>springboot</category>
    </item>
    <item>
      <title>Day-94,95 Understanding Servlets, JSP, Annotations and CORS</title>
      <dc:creator>Tamilselvan K</dc:creator>
      <pubDate>Thu, 18 Sep 2025 07:11:57 +0000</pubDate>
      <link>https://forem.com/tamilselvan1812/day-9495-understanding-servlets-jsp-annotations-and-cors-2k6j</link>
      <guid>https://forem.com/tamilselvan1812/day-9495-understanding-servlets-jsp-annotations-and-cors-2k6j</guid>
      <description>&lt;h2&gt;
  
  
  Servlets: Backend Logic and Request Handling
&lt;/h2&gt;

&lt;p&gt;A Servlet is a Java program that runs on a server and handles HTTP requests and responses. Servlets are part of the Java EE (Jakarta EE) ecosystem and are primarily responsible for backend logic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Definition: A Servlet is a Java class that processes requests and generates responses.&lt;/li&gt;
&lt;li&gt;Role: Manages business logic and request handling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  JSP (Java Server Pages): Presentation Layer
&lt;/h2&gt;

&lt;p&gt;JSP is used for the presentation layer of an application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Definition: JSP combines HTML and Java code.&lt;/li&gt;
&lt;li&gt;Role: Used to display dynamic content (UI part).&lt;/li&gt;
&lt;li&gt;Difference from Servlets: While Servlets usually handle business logic, JSP focuses on presentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Annotations
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Java Annotations provide metadata (example: &lt;a class="mentioned-user" href="https://dev.to/override"&gt;@override&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Spring Boot Annotations reduce boilerplate code, handle Dependency Injection (DI), configure REST APIs, ORM, security, and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  CORS (Cross-Origin Resource Sharing)
&lt;/h2&gt;

&lt;p&gt;CORS is a security feature in browsers that controls cross-origin requests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Same-Origin Policy: By default, browsers block requests from different origins.&lt;/li&gt;
&lt;li&gt;Cross-Origin Requests: If your React app runs on port 3000 and Spring Boot backend runs on 8080, the browser blocks the request without CORS configuration.&lt;/li&gt;
&lt;li&gt;Solution: Add @CrossOrigin annotation in your Spring Boot REST controller.&lt;/li&gt;
&lt;li&gt;Prevents malicious cross-site data access.&lt;/li&gt;
&lt;li&gt;Allows safe communication between frontend (React) and backend (Spring Boot).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Example Workflow: React + Spring Boot
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;React app runs at localhost:3000.&lt;/li&gt;
&lt;li&gt;Spring Boot backend runs at localhost:8080.&lt;/li&gt;
&lt;li&gt;Without CORS, the browser blocks the request.&lt;/li&gt;
&lt;li&gt;Adding @CrossOrigin allows cross-origin communication.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>java</category>
      <category>springboot</category>
    </item>
  </channel>
</rss>
