This application provides backend functionality for managing wishlists of users on an e-commerce platform. Users can create and manage their wishlists by adding or removing items.
- Java 17
- Spring Boot 3.2.2
- Spring Data JPA
- Spring Security
- MySQL
- Mockito
- JUnit
Before running the application, ensure you have the following installed:
- Java Development Kit (JDK) 11 or later
- Apache Maven
- MySQL
- Create a MySQL database for the application.
- Update the
application.properties
file with your database connection details:
git clone https://github.com/kumarprem66/UserWishList.git
Navigate to the project directory:
cd UserWishList
Update the application.properties file with your MySQL database configuration:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/WishList
spring.datasource.username=root
spring.datasource.password=premk
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.format_sql=true
server.port=8088
mvn clean package
mvn spring-boot:run
The application will start running on http://localhost:8088
To run the unit tests, execute the following command:
mvn test
- POST /api/create-customer: Create customer.
- GET /api/get-customer/{usernameOrEmail}: Retrieves customer details.
- POST /api/wishlists/{usernameOrEmail}: Creates a new wishlist item.
- GET /api/wishlists/{usernameOrEmail}: get customer's wishlist
- DELETE /api/wishlists/{usernameOrEmail}/{id}. deletes the wishlist item
For detailed API documentation and usage examples, refer to the Swagger UI or OpenAPI documentation.
http://localhost:8088/swagger-ui/index.html#/wish-controller
Contributions are welcome! Feel free to open issues or submit pull requests for any improvements or fixes.