Commit edf1ef53 by Thaswin Muralikaran

Added Dockerfile and update README.md

parent eec700e2
FROM eclipse-temurin:21-jdk-alpine
WORKDIR /app
COPY build/libs/*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]
......@@ -21,6 +21,32 @@ By the end of this session, students will be able to create a robust Spring Boot
## 2. Project Setup (15 minutes)
### SQL Setup
- Install MySQL Server by following this url [click here](https://dev.mysql.com/downloads/installer/).
- After installing the MySQL server, add the path in System Variables.
- Copy the path of the MySQL server which will like this `C:\Program Files\MySQL\MySQL Server 8.0\bin` for most cases.
- Open Environment Variables.
- Click Environment Variables > Under System Variables, find Path > Edit.
- Add the copied path of MySQL server.
- Click OK to save.
- Install SQLyog by following this url [click here](https://github.com/webyog/sqlyog-community/wiki/Downloads).
### JDK Setup
- Install Java version 21 by following this link [click here](https://www.oracle.com/java/technologies/javase/jdk21-archive-downloads.html).
- Upon installing JDK 21, open Environment Variables.
- Under System Variables, click New.
- Variable Name: JAVA_HOME.
- Variable Value: C:\Program Files\Java\jdk-21 (or your JDK path)
- Click OK to save.
- Add Java to PATH:
- Find Path under System Variables > Click Edit > New.
- Add: %JAVA_HOME%\bin
- Click OK to save.
### Spring Boot Setup
- Create new project in [Spring initializr](https://start.spring.io/).
- Choose Java, Gradle, and the spring version 3.44.
- Create a name for the project.
......@@ -48,27 +74,27 @@ my-product-management-svc
│ ├───java
│ │ └───com
│ │ ├───ctsb
│ │ └───my_product_management_svc
│ │ ├───category
│ │ │ ├───Category.java
│ │ │ ├───CategoryController.java
│ │ │ ├───CategoryDto.java
│ │ │ ├───CategoryRepository.java
│ │ │ ├───CategoryService.java
│ │ ├───config
│ │ │ ├───OpenApiConfig.java
│ │ │ ├───SwaggerConfig.java
│ │ └───product
│ │ │ ├───Product.java
│ │ │ ├───ProductController.java
│ │ │ ├───ProductDto.java
│ │ │ ├───ProductRepository.java
│ │ │ ├───ProductService.java
│ │ │ ├───Status.java
│ │ └───example
│ │ └───my_product_management_svc
│ │ ├───category
│ │ │ ├───Category.java
│ │ │ ├───CategoryController.java
│ │ │ ├───CategoryDto.java
│ │ │ ├───CategoryRepository.java
│ │ │ ├───CategoryService.java
│ │ ├───config
│ │ │ ├───OpenApiConfig.java
│ │ │ ├───SwaggerConfig.java
│ │ └───product
│ │ │ ├───Product.java
│ │ │ ├───ProductController.java
│ │ │ ├───ProductDto.java
│ │ │ ├───ProductRepository.java
│ │ │ ├───ProductService.java
│ │ │ ├───Status.java
│ │
│ └───resources
├───static
└───templates
└───test
```
......
spring.application.name=my-product-management-svc
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/productmngm?useSSL=false&serverTimezone=UTC
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/productmngm?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
spring.datasource.username=root
spring.datasource.password=01234
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment