Hotel-Management-System

๐Ÿจ Hotel Management System

A Spring Bootโ€“based Hotel Management System that provides REST APIs to manage hotel information. The application follows a clean layered architecture using Controller, Service, Entity, and DTO patterns and demonstrates inter-service communication using RestTemplate.


๐Ÿ“Œ Features


๐Ÿ›  Tech Stack


๐Ÿ“‚ Project Structure

src/main/java
โ”œโ”€โ”€ controller
โ”‚ โ””โ”€โ”€ HotelController.java
โ”œโ”€โ”€ service
โ”‚ โ””โ”€โ”€ HotelService.java
โ”œโ”€โ”€ dto
โ”‚ โ”œโ”€โ”€ HotelDTO.java
โ”‚ โ””โ”€โ”€ UpdateHotelAddressDTO.java
โ”œโ”€โ”€ entity
โ”‚ โ””โ”€โ”€ Hotel.java
โ”œโ”€โ”€ util
โ”‚ โ””โ”€โ”€ RestTemplateCommunicator.java
โ””โ”€โ”€ Application.java


๐Ÿ” Application Flow

  1. Client sends HTTP request to HotelController
  2. Controller forwards request to HotelService
  3. Service layer processes business logic
  4. DTOs are used for request/response mapping
  5. Response is returned to client in JSON format

๐Ÿ“ฎ Sample API Endpoints

Create Hotel
POST /hotels

Get All Hotels
GET /hotels

Update Hotel Address
PUT /hotels/address

(Note: Endpoints may vary based on implementation)


๐Ÿš€ How to Run the Project

  1. Clone the repository

  2. Open the project in any Java IDE (IntelliJ / Eclipse / VS Code)

  3. Ensure Java and Maven are installed

  4. Run the application
    mvn spring-boot:run

    OR run the main application class directly from IDE

  5. Test APIs using Postman


๐ŸŽฏ Learning Outcomes


๐Ÿ“Œ Future Enhancements