Image for post
Image for post

Dear friends welcome back. This is a very important article. This article explains how to set up the Billing System on your Local Computer. In order to test the Billing System Application or if you want to study the Billing System Project, you must set up the Billing System on your computer. Please read this full article for a successful setup.

Prerequisite to setup Billing System
The following software you have to install in your computer in order to set up a Billing System in your System.

Java 8
It is available to download from this link:

Image for post
Image for post
String new vs equal operator

if we declare a String variable with a value, the Java store the String value in the String pool area. if we declare another String variable, if we assign the same value as below, Java never allocates a new address for the second variable because, since the value is already available in the String pool area, java assigns the “Suresh” ‘s reference to the second variable that's it. so now both variables pointing the same reference variable. This process happens only if we declare a string variable like below. …

Image for post
Image for post
Tax table integration

Welcome back friends, In this story, we will going to learn about the implementation of Tax, offer, and Category CRUD Operation. CRUD nothing but Create, Read, Update, and Delete operation. We will be going to perform these operations against these tables. Tax offer and category tables are important tables in the billing System. Let explore the table and its CRUD operation.

Tax Table
The tax table contains the HSN Code for various types of Products. each code mapped with Tax percentage. Following is the Table relation between Product and Tax table

Image for post
Image for post

The tax_id is associated with each product. Each tax_id is mapped with one HSN Code. The HSN code is having its respective GST percentage. Through this relation, we can easily find out what is the GST of each Product in our System. …

Image for post
Image for post
Core java string comparison

Welcome back, friends. Most of the Java developers knows What is different between “equals” and “==” operator and how it different while comparing two string using “equals” and “==”.
String name1 = “Suresh”;
String name2 = new String(“Suresh”);
System.out.println(name1 == name2); // false
System.out.println(name1.equals(name2)); // true

In the above program, name1 and name2 are having “Suresh” value. If we use the “==” operator for comparing the two String values, it gives false. Both values are the same but it is giving false. Why? The reason is, “==” equal to operator compares two String value’s memory addresses(reference). According to the above program, name1 and name2 are having two different memory addresses so it is not matching thas the reason it is giving false. …

Image for post
Image for post
Introduction to Web Application

Dear Friends welcomes you to start Spring Boot for Beginners course. This is course designed for those who don’t have knowledge of Web Application concepts. I will be going to teach you the fundamentals. In order to continue this course, you must know the fundamentals of Java Programming. Please learn Java programming and come back and read this tutorial to become a Spring Boot Programmer.

What is a Web Application?
If you say any software is a Web Application, it must have two layers which are Client and Server. The following diagram explains the Web Application Architecture flow.

Image for post
Image for post

The client is purely developed using HTML/CSS and JavaScript and the Server is purely developed by some Server-side programming language. In our case, our side programming is Java. The client always requests the data to Server and the Server takes the request from the Client, if the request is valid, the Server sends the data to the Client(This is called a response). So, a request is coming from the client and a response is coming from the Sever. Request and response nothing but simple data only. These data should understand both Client/Server to perform smooth communication.
For example:
Let say, a user entering the Credential in the login form which is the username and password. This is called request data. The server receives the request data, if the requested data is available in the Sever(username password exists), The server allows to login and send all user information to the client. This is called Response data. …

Image for post
Image for post

Welcome back, friends. In this story, I will be going to explain the implementation of JWT in our Spring Boot App. If you are not familiar with Security. I am suggesting to read the following Stories
Enabling default Spring Security in Spring Boot
Enabling Spring Security with a custom user
Spring Boot Basic Authentication step by step implementation

The following are key classes to enable JWT Authorization in our Spring Boot Application.


Following two artifacts we have to add in our pom.xml file. The first artifact enables the Spring security in our Spring Boot App. The second artifact is for JWT API. …

Image for post
Image for post

Welcome back friends in this video we will going to talk about Spring Boot Basic.

What is Basic Authentication in Rest API?
This is the easiest and straight forward authentication mechanism in the Rest API Authorization technique. The client sends the credential in the following format
username: password
This credential encrypted using Base64. This is the encoding technique followed in Basic Authentication. The client must encode the above-formated credential using Base64 and send it to Server for authorization. The encrypted format should like below. The encrypted string prefixed with “Basic”
Basic c3VyZXNoOnN1cmVzaA==

Now we will be going to implement Basic authentication in our Spring Boot Application. …

Image for post
Image for post

Welcome back, friends! We have learned how to enable the Spring Boot default Authorization Previous Story. Now we will be going to learn how to enable Spring Boot Authorization using our own Credentials.

In order to configure our own Credential, we have to create a Spring Security configuration class which extend from “WebSecurityConfigurerAdapter”

public class SpringSecurityConfig extends WebSecurityConfigurerAdapter {

As above create a new class which extends from WebSecurityConfigurerAdapter then we need to override the following configure Method.

protected void configure(AuthenticationManagerBuilder auth) throws Exception {

In this method, we need to configure our own credentials As of now I will be going to use in-memory authentication i.e we are not fetching the user details from Database instead we are keeping the Credentials in Spring Boot memory.

For further reading please click the below link.
Enabling Spring Boot Authorization with our own Credential

Image for post
Image for post
Spring Boot Default Authorization

Welcome back friends, Do you know spring boot is by default an unprotected application. i.e. if you develop any Webservice endpoint, it is by default accessible by everybody in the world. that’s why I am saying that Spring Boot is an unprotected application.

If you want to make your spring boot an authorized application, you have to customize your application using the spring boot Security starter project. Following artifact, you have to add in your Spring Boot Application. It is called a Spring Boot Security starter Project.


For further reading please click the below link.
How to enable default Authorization in Spring Boot

Centralized exception handling is a great feature in Spring Boot. Once we created a common method for a particular exception we can reuse that exception handler method anywhere in your application. The following three things are important to implement centralized exception handling.

1) ResponseEntityExceptionHandler
2) @ControllerAdvice

The above two friends will help you to implement the centralized exception handler.

To implement our generic Exception handling method, we need to create a new class. This must extend from ResponseEntityExceptionHandler.

public class BillingExceptionHandler extends ResponseEntityExceptionHandler {

Syntax to create a generic exception handler class
@ExceptionHandler(Your Exception handler class)
When you create an exception handling method, the method must be annotated with the above annotation and you need to pass your Exception class as a parameter which you want to handle. For example. …



I am a Java / J2EE Consultant. Happy to learn.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store