Skip to content

A simple parking lot applicaion built using Spring Boot to demostrate Spring Security with Json Web Tokens.

Notifications You must be signed in to change notification settings

shubhamv108/spring-boot-jwt-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b911a9a · Jul 24, 2021

History

8 Commits
Jun 25, 2021
May 20, 2019
May 20, 2019
May 31, 2019
May 31, 2019
May 31, 2019
May 31, 2019
Apr 13, 2020
May 31, 2019
May 31, 2019
May 31, 2019
May 31, 2019
Jan 26, 2020
Jan 26, 2020

Repository files navigation

To run the application, execute following command in terminal -

cd app-parking-lot

mvn clean install

java -jar -Dspring.profiles.active=<dev/prod> -Dspring.datasource.url=jdbc:mysql://:/<db_name>?useSSL=false -Dspring.datasource.username=root -Dspring.datasource.password=root .jar

After successfully execution, open browser and check following url -

http://:/api/public/health

For depolying with an Nginx Rverse proxy by replacing text in between <> :

cd app-parking-lot

mvn clean install

cp parking-lot.service /etc/systemd/system/

sudo vi /etc/system/system/parking-lot.serivce

Provide correct file path in ExecStart

ExecStart=/usr/bin/java -jar <DIR_PATH>/parking-lot/app-parking-lot/target/parking-lot.jar

sudo systemctl start parking-lot

cp parking-lot.conf /etc/nginx/conf.d/

sudo systemctl start nginx

Application shall be accessible at http://localhost:8080/parking-lot/...

Build & Run application using Docker

docker build -f Dockerfile-DEV -t shubhamv/parking-lot . docker run --network="host" -e JAR=parking-lot.jar -t shubhamv/parking-lot:latest .