The Room Management System (ROMS) is a Spring Boot application designed to manage room schedules, lecturers, and related data. It provides APIs for filtering schedules, managing rooms, and handling authentication.
- Manage lecturers, rooms, and schedules.
- Filter schedules by date, room, building, and more.
- Authentication and role-based access control.
- CORS support for cross-origin requests.
- Secure JWT-based authentication.
- Java 21
- Spring Boot
- PostgreSQL
- Maven
- JWT for Authentication
- JDK 21 (Ensure
JAVA_HOMEis set up) - Maven
- Local PostgreSQL server
.env.propertiesfile with required environment variables
-
Clone the repository
git clone https://github.com/Phuc000/Room-Management-Service.git cd roms -
Create an
env.propertiesfile in the root directory with the following content:DB_URL=jdbc:postgresql://localhost:5432/your_database DB_USERNAME=your_username DB_PASSWORD=your_password JWT_SECRET=your_jwt_secret JWT_EXPIRATION=86400000
-
Install dependencies
mvn clean install
-
Set up the database
- Ensure PostgreSQL is running.
- Create the database and configure the
DB_URL,DB_USERNAME, andDB_PASSWORDinenv.properties.
-
Run the application
mvn spring-boot:run
-
Access the application
- API:
https://localhost:7288
- API:
| Variable | Description |
|---|---|
DB_URL |
Database connection URL |
DB_USERNAME |
Database username |
DB_PASSWORD |
Database password |
JWT_SECRET |
Secret key for JWT |
JWT_EXPIRATION |
JWT expiration time in milliseconds |
-
Build the project
mvn clean compile
-
Run the application
mvn spring-boot:run
__