SpringBoot Backend API for an eCommerce application
git clone https://github.com/HecticHiccups/SpringBoot-Woot.git
- Import the project to your desired IDE my preference is IntelliJ
- Once imported you must modify your
application.properties
file.
## Port
server.port = 3001
## Spring DATASOURCE
spring.datasource.url = jdbc:mysql://localhost/db_name
spring.datasource.username = root
spring.datasource.password = password
## Hibernate Properties
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.jpa.database-platform = org.hibernate.dialect.MySQL57Dialect
spring.jpa.show-sql = true
# Hibernate ddl auto=update will automatically create the tables
spring.jpa.hibernate.ddl-auto = update
- Once modified you can run your server application.
Alternative: go to the project location in the terminal & run
mvn spring-boot:run
returns json of all users within user entity model
[
{
"userID": 2,
"userEmail": "[email protected]",
"userName": "Witwicky",
"firstName": "John",
"lastName": "Wick",
"password": "1234",
"admin": true
}
...
]
insert new user into user entity, userID
auto increments.
{
"userEmail": "Anything",
"userName": "Your",
"firstName": "Heart",
"lastName": "Desires",
"password": "....",
"admin": true
}
returns json of desired product determined by id
params.
[
{
"userID": 2,
"userEmail": "[email protected]",
"userName": "Witwicky",
"firstName": "John",
"lastName": "Wick",
"password": "1234",
"admin": true
}
]
returns json of desired user determined by id
params.
[
{
"productID": 2,
"productName": "One Piece Shirt",
"productDescription": "A Sugoi Anime Shirt for Weebs",
"productPrice": 12,
"productQuantity": 12,
"productImage": "onepiece.com"
}
]
returns json of all products within product entity model
[
{
"productID": 1,
"productName": "Updated Naruto Shirt xx",
"productDescription": "A Sugoi Anime Shirt for Weebs",
"productPrice": 12,
"productQuantity": 12,
"productImage": "weirdurl.com"
}
...
]
- Maven - Dependency Management
- Spring Boot - Spring Boot
- JPA - JPA
- MySQL - MySQL
- Jesus Arteaga
- Okta-React-SpringBoot - Matt Raible
- SpringBoot-CRUD - Geeky Learner