This is my spring boot application representing basic e-commerce application example. It still requires user authentication and shipping options to make it usefull ( and a front-end client ) but it's a good starting point. You can manage users, orders and products using CRUD operations using RESTful API.
API documentation is generated during verify/install phase using Spring REST Docs. Make sure you are in eCommerce-server directory and excecute following command
mvn clean verify
This will perform unit and integration tests and generate documentation in html form that will avaliable under
{root}/eCommerce-server/target/generated-docs/api-guide.html
Clone repository
https://github.com/LBlocki/Spring-eCommerce-example.git
Choose database
**If you wish to persist data use MySQL database:**
Create new database:
```bash
create database e_commerce_app
```
Uncomment properties in
```bash
{root}/eCommerce-server/src/main/resources/application.properties
```
Feel free to configure them. Also if you dont want
application to add initial data at runtime change active profile from dev to anything else
**Using H2 embedded database:**
It is fast and auto configured but does not persist data after shut down. Also if you dont want
application to add initial data at runtime change active profile from dev to anything else
Excecute
Run the application using maven command:
mvn spring-boot:run
You can package it into the jar file as well and then run it
```bash
mvn package
java -jar target/{name_of_snapshot}.jar
```
Clone repository
https://github.com/LBlocki/Spring-eCommerce-example.git
Choose database
Docker is configured to use MySQL automatically so make sure to uncomment properties under
{root}/eCommerce-server/src/main/resources/application.properties
Feel free to configure them. Also if you dont want
application to add initial data at runtime change active profile from dev to anything else
Excecute
Make sure you are in root directory. Excecute following commands
docker-compose build
docker-compose up
If you want docker to run silently use -d
By default application will use 8080 port.
Feedback is appreciated!