Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kazvee/learning-spring
πΏ Learning Spring β is a repository for a learning project that uses Spring Boot 3 to explore Spring 6 as a Java framework
https://github.com/kazvee/learning-spring
java spring spring-boot
Last synced: 15 days ago
JSON representation
πΏ Learning Spring β is a repository for a learning project that uses Spring Boot 3 to explore Spring 6 as a Java framework
- Host: GitHub
- URL: https://github.com/kazvee/learning-spring
- Owner: kazvee
- Created: 2024-10-12T21:15:03.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-24T02:55:37.000Z (24 days ago)
- Last Synced: 2024-10-26T10:53:00.101Z (22 days ago)
- Topics: java, spring, spring-boot
- Language: Java
- Homepage:
- Size: 3.61 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# πΏ Learning Spring β
This repository documents my progress during the 'Learning Spring 6 with Spring Boot 3' course. π©βπ»
I've also made some styling changes and added a landing page for the fictitious Landon Hotel just for fun! π¨
## Table of Contents
- [Final Product](#final-product)
- [Image Credits](#image-credits)
- [API Endpoints](#api-endpoints)
- [Key Dependencies](#key-dependencies)
- [Installation](#installation)## Final Product
### Main Page:
![Landon_Hotel_Main_Page](/landon-hotel/src/main/resources/static/images/readme/Landon_Hotel_Main_Page.png)
### Rooms Page:
![Landon_Hotel_Rooms_Page](/landon-hotel/src/main/resources/static/images/readme/Landon_Hotel_Rooms_Page.png)
### Reservations Page:
![Landon_Hotel_Reservations_Page](/landon-hotel/src/main/resources/static/images/readme/Landon_Hotel_Reservations_Page.png)
## Image Credits
Hotel image by [Hans-Joachim MΓΌller-le Plat](https://pixabay.com/users/zuluzulu-2223810/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=1567013) from [Pixabay](https://pixabay.com//?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=1567013)
## API Endpoints
You can test the API endpoints using curl and jq:
`curl http://localhost:8080/api/rooms | jq`Or use your web browser to visit the available API endpoints:
### Rooms
- Get all rooms:
`http://localhost:8080/api/rooms`- Get a specific room by ID:
`http://localhost:8080/api/rooms/{roomId}`### Guests
- Get all guests:
`http://localhost:8080/api/guests`- Get a specific guest by ID:
`http://localhost:8080/api/guests/{guestId}`### Reservations
- Get all reservations:
`http://localhost:8080/api/reservations`
- Get a specific reservation by ID:
`http://localhost:8080/api/reservations/{reservationId}`## Key Dependencies
- Java v21
- Maven v3
- Spring Framework (including Spring Boot)
- PostgreSQL
- Dotenv-java
- Lombok
- Thymeleaf## Installation
- Fork this repository to your own GitHub account
- Clone your fork onto your local machine
- Navigate to the landon-hotel directory
`cd landon-hotel`
- Install dependencies:
`mvn clean install`
- Create a PostgreSQL database for the application
- Populate the database using the SQL schema and data files located in the `bin/postgresql` directory
- Create a new `.env` file in the `landon-hotel` directory with your database credentials (use the `.env.example` file for guidance)
- Run the app from inside the `landon-hotel` directory
`mvn spring-boot:run`
- Navigate to [http://localhost:8080](http://localhost:8080/) in your browser