-
The application secured endpoints can just be just accessed if a user has valid credentials (
usernameandpassword) and has autorization roles for it.Business Trips Servicestores its data inPostgresdatabase.Business Trips Service APIhas the following endpointsEndpoint Secured Roles POST /auth/authenticate -d {"username","password"}No GET /welcomeNo GET /swagger-ui.htmlNo GET /api/adminYes GET /api/admin/tripsYes ADMINGET /api/admin/trips/{id}Yes ADMINPATCH /api/admin/trips/{id}Yes ADMINGET /api/profileYes GET /api/tripsYes USERPOST /api/tripsYes USERGET /api/trips/{id}Yes USERPATCH /api/trips/{id}Yes USER
-
In a terminal, make sure you are inside
BusinessTripsBackendroot folder -
Run the following command to start docker compose containers
docker compose up -d
-
Business Trips Service
-
Open a terminal and navigate to
BusinessTripsBackendfolder -
Run the following
Mavencommand to build and package the application in JAR./mvn clean package spring-boot:repackage -
Run the following
Javacommand to run the applicationjava -jar {Absolute path to the root folder}\BusinessTripsBackend\target\BusinessTripsBackend-1.0-SNAPSHOT.jar
-