-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d21078
Showing
259 changed files
with
20,353 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE USER 'ecommerceapp'@'localhost' IDENTIFIED BY 'ecommerceapp'; | ||
|
||
GRANT ALL PRIVILEGES ON * . * TO 'ecommerceapp'@'localhost'; | ||
|
||
# | ||
# Starting with MySQL 8.0.4, the MySQL team changed the | ||
# default authentication plugin for MySQL server | ||
# from mysql_native_password to caching_sha2_password. | ||
# | ||
# The command below will make the appropriate updates for your user account. | ||
# | ||
# See the MySQL Reference Manual for details: | ||
# https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html | ||
# | ||
ALTER USER 'ecommerceapp'@'localhost' IDENTIFIED WITH mysql_native_password BY 'ecommerceapp'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
-- ----------------------------------------------------- | ||
-- Schema full-stack-ecommerce | ||
-- ----------------------------------------------------- | ||
DROP SCHEMA IF EXISTS `full-stack-ecommerce`; | ||
|
||
CREATE SCHEMA `full-stack-ecommerce`; | ||
USE `full-stack-ecommerce` ; | ||
|
||
-- ----------------------------------------------------- | ||
-- Table `full-stack-ecommerce`.`product_category` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `full-stack-ecommerce`.`product_category` ( | ||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT, | ||
`category_name` VARCHAR(255) NULL DEFAULT NULL, | ||
PRIMARY KEY (`id`)) | ||
ENGINE=InnoDB | ||
AUTO_INCREMENT = 1; | ||
|
||
-- ----------------------------------------------------- | ||
-- Table `full-stack-ecommerce`.`product` | ||
-- ----------------------------------------------------- | ||
CREATE TABLE IF NOT EXISTS `full-stack-ecommerce`.`product` ( | ||
`id` BIGINT(20) NOT NULL AUTO_INCREMENT, | ||
`sku` VARCHAR(255) DEFAULT NULL, | ||
`name` VARCHAR(255) DEFAULT NULL, | ||
`description` VARCHAR(255) DEFAULT NULL, | ||
`unit_price` DECIMAL(13,2) DEFAULT NULL, | ||
`image_url` VARCHAR(255) DEFAULT NULL, | ||
`active` BIT DEFAULT 1, | ||
`units_in_stock` INT(11) DEFAULT NULL, | ||
`date_created` DATETIME(6) DEFAULT NULL, | ||
`last_updated` DATETIME(6) DEFAULT NULL, | ||
`category_id` BIGINT(20) NOT NULL, | ||
PRIMARY KEY (`id`), | ||
KEY `fk_category` (`category_id`), | ||
CONSTRAINT `fk_category` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`id`) | ||
) | ||
ENGINE=InnoDB | ||
AUTO_INCREMENT = 1; | ||
|
||
|
||
-- ----------------------------------------------------- | ||
-- Add sample data | ||
-- ----------------------------------------------------- | ||
|
||
INSERT INTO product_category(category_name) VALUES ('BOOKS'); | ||
|
||
INSERT INTO product (sku, name, description, image_url, active, units_in_stock, | ||
unit_price, category_id, date_created) | ||
VALUES ('BOOK-TECH-1000', 'JavaScript - The Fun Parts', 'Learn JavaScript', | ||
'assets/images/products/placeholder.png' | ||
,1,100,19.99,1, NOW()); | ||
|
||
INSERT INTO product (sku, name, description, image_url, active, units_in_stock, | ||
unit_price, category_id, date_created) | ||
VALUES ('BOOK-TECH-1001', 'Spring Framework Tutorial', 'Learn Spring', | ||
'assets/images/products/placeholder.png' | ||
,1,100,29.99,1, NOW()); | ||
|
||
INSERT INTO product (sku, name, description, image_url, active, units_in_stock, | ||
unit_price, category_id, date_created) | ||
VALUES ('BOOK-TECH-1002', 'Kubernetes - Deploying Containers', 'Learn Kubernetes', | ||
'assets/images/products/placeholder.png' | ||
,1,100,24.99,1, NOW()); | ||
|
||
INSERT INTO product (sku, name, description, image_url, active, units_in_stock, | ||
unit_price, category_id, date_created) | ||
VALUES ('BOOK-TECH-1003', 'Internet of Things (IoT) - Getting Started', 'Learn IoT', | ||
'assets/images/products/placeholder.png' | ||
,1,100,29.99,1, NOW()); | ||
|
||
INSERT INTO product (sku, name, description, image_url, active, units_in_stock, | ||
unit_price, category_id, date_created) | ||
VALUES ('BOOK-TECH-1004', 'The Go Programming Language: A to Z', 'Learn Go', | ||
'assets/images/products/placeholder.png' | ||
,1,100,24.99,1, NOW()); |
8 changes: 8 additions & 0 deletions
8
01-starter-files/spring-boot-properties/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.datasource.url=jdbc:mysql://localhost:3306/full-stack-ecommerce?useSSL=false&useUnicode=yes&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&serverTimezone=UTC | ||
spring.datasource.username=ecommerceapp | ||
spring.datasource.password=ecommerceapp | ||
|
||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect | ||
|
||
spring.data.rest.base-path=/api |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
HELP.md | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### VS Code ### | ||
.vscode/ |
19 changes: 19 additions & 0 deletions
19
02-backend/spring-boot-ecommerce/.mvn/wrapper/maven-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
wrapperVersion=3.3.2 | ||
distributionType=only-script | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip |
Oops, something went wrong.