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.
It is available to download from this link:
After installing Java make sure your Java path and Classpath set properly in your environment variable.
Eclipse or IntelliJ
I am using the following version of IntelliJ. It is absolutely fine if you are using this prior version of Intellij (The Intellij version must support Java 8)
Use the following version of eclipse or the prior version of eclipse. don’t use the latest version of the eclipse because the latest version of eclipse expecting to install java 11. If you are using Java 11 you can use the latest version of eclipse. I have not tested a Billing System using Java 11.
I have installed MySQL 8.0.21 Community Server. If you are using a prior version of MySQL, it is fine but Don’t go prior to version 5
PostMan or any other Rest client
After a successful setup, you need to test the Rest Webservice call. In order to test the Rest Service, we need any Rest Client. I am using the PostMan Rest client to test all Billing System endpoints. I am recommending to install PostMan. If you are familiar with any other Rest Client, you can go with that.
The above software is mandatory software to run the Billing System on your computer. Optionally you have to install maven because Maven is coming along with Eclipse and IntelliJ. if you want to run the build command in the command line, you have to download the latest version of Maven from the following site.
You can download the Maven from the following site
This is the Prerequisite software you need to install on your computer.
I am assuming that you have installed above software successfully, if you face any issue, please contact me, I am ready to help you out.
The next step is, you need to download the latest code from the following site. https://pinepad.in/downloads/ once you open this page, there is a download page, click the download button to download the latest code of Billing System.
Save the rar file somewhere else in your local computer i.e In my case I have downloaded it in the download folder. and extracted the rar file and copied the extracted folder in the following location of my computer as in the screenshot. Once you extracted the actual folder name is “billingsystem-main”. rename this folder name to “billingsystem” Renaming folder to “billingsystem” very very important.
I will be going to use IntelliJ IDE for setting up the Project.
Open IntelliJ and select File -> New -> Project from existing source as shown in the screenshot
Once you click “Project from Existing Source” the following windows will show where you need to select your pom.xml file from the project folder as shown in the below screenshot. Then, click ok button.
Once you click the ok Button, the following dialog will open where you can select “This Window” or “New Window”. I Prefer to click “New Window” so the project will open in the new IntelliJ window.
the Project will start the import. If doing this for the first time, it will take some time because it will download all the library files. After success full import, your left side Project navigator shows like below as in the Screenshot. If you see like below, you have successfully imported the Billing System Project.
Now we need to set up a DB connection. Go to src/main/resource and open the application.yml file as shown in the below picture.
In the application.yml file, there is data source configuration in the above screenshot where you need to replace with your correct “username”,”password” and URL
url: jdbc:mysql://localhost:3306/<your db name> username: <your user name> password: <your password>
Once you have done above configuration, you have completed the DB connection configuration. Now you ready to start your Billing System Spring Boot Application. Go to main/java/com/itgarden/BillingsystemApplication.java. Right-click on “BillingsystemApplication” then click “Run BillingSystemA….main()” as shown in the below image.
Once you click, the server starts to run. After successfully starting the server you can see the following information in the Server console log like the port number and some table creation command alter command etc. this meaning, the Billing System is successfully deployed on your local computer.
In order to test your application whether it is working well or not. Open PostMan and add following endpoint in the new Tab. This is the GET Method endpoint so select GET method in PostMan as shown in the screenshot.
For the eclipse and STS step, we need to follow the same step which I explained above only difference is the way of importing the project is different. Now we will go to see the Project import steps in Eclipse.
I have downloaded my billing system rar file in following location.
D:\billing-system-workspace\eclipse-workspace and exteracted the rar file and rename to “billingsystem” as show in the below screenshot
The next step is needed to import this project into Eclipse. open eclipse and select the workspace that you want. In my case, I have selected the following location where I extracted my billing System shown in the picture.
Now click Launch. When you open the first time in the location of the workspace, it will show like below.
close the welcome window by clicking “x” simple left top corner which I highlighted in the red circle.
Select file -> new project as shown in the below picture
Select File -> import as shown in the below image.
Once you click “import”, the following popup will appear where you need to select the existing maven project as shown in the screenshot.
once you click the “existing maven project” following window appear.
where you need to click the browse button and select our billingsystem root folder as shown in the below picture. Then, click “Finish” button in this window.
Once you click the “Finish” button. Your Billing System starts import in your Eclipse. like below in the picture. it will take more time if you’re importing the billing system the first time. As per the below screenshot, the Project is imported successfully but the eclipse doesn’t have the Lombok library so, it shows so many errors.
To fix the Lombok issue, install the Lombok in your eclipse by reading the following article.
Once you installed Lombok, restart your eclipse, the Lombok issue will disappear. Still, your eclipse shows the error, do the following step as shown in the below image.
Once you click “Update Project” the following window will appear where you need to select click ok. That’s it This time Lombok must work and all compilation errors disappear.
Now we are ready to start the application. Start the application as shown in the below image.
After success full starting the server you can see the following logs in the Server console. You can see in the below log that shows the Server port as 9091 and table creation log etc. This shows that we have deployed the Billing System successfully in our Computer.
If you want to do some sample test whether your server is working or not. Use the following endpoint, it will give the following output.
“Server is running…”
Open PostMan and run the following endpoint
you can see the response as shown in the below screenshot.
The Billing System Project setup is Successfully completed. Now you can play around with all endpoints already created. If you face any issue, contact me I will help you out.
Exactly the same step you need to follow for STS which you followed for Eclipse
Please follow our ITGARDEN YouTube channel for Billing System Project development work using Spring Boot. The Project source code absolutely free. This project is very good for those who are looking for real-time project experience in Spring Boot. To understand the Billing System Project code, watch all Billing System-related YouTube videos from this link. Click Here
Our YouTube Channel
Please follow me on Medium.com for all billing system related stories and Java-based technical Articles
Note: To find all billing System-related stories find “billing system itgarden” in medium.com