Skip to content

Commit 3beb717

Browse files
committed
Created Java SpringBoot Microservices apps
1 parent 5bcf963 commit 3beb717

51 files changed

Lines changed: 550 additions & 414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,8 @@
2323
hs_err_pid*
2424
/.metadata/
2525

26+
/target/
27+
**/datadir/*
28+
2629
# Flight Service Project
2730

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"java.dependency.packagePresentation": "hierarchical",
3+
"java.dependency.syncWithFolderExplorer": true,
4+
"java.configuration.updateBuildConfiguration": "interactive"
5+
}

BasicsOfJDBC/.project

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# JAVA SpringBoot Microservices CI/CD DevOps Project
2+
3+
## Prerequisites
4+
- Set up WSL2 with Ubuntu 20.04 + (preferably 22.04)
5+
- OS Windows 11 22H2
6+
- AWS Free Tier Account
7+
- Github Account
8+
- Postman API Testing tool
9+
- VSCode
10+
11+
## Setup Inside WSL Ubuntu
12+
- Make a bin directory in our user home directory to store binaries.
13+
- mkdir -p ~/bin
14+
15+
- Add the new bin directory to our Path.
16+
- echo export PATH=\$PATH:~/bin >> ~/.bashrc && source ~/.bashrc
17+
18+
- Create a "repos" to work on your project
19+
- mkdir -p ~/repos
20+
21+
- Docker version 20.10.21
22+
- sudo apt install apt-transport-https ca-certificates curl software-properties-common
23+
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
24+
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
25+
- sudo apt update && sudo apt install docker-ce
26+
- sudo usermod -aG docker ${USER} && su - ${USER}
27+
- sudo service docker start
28+
- docker ps
29+
30+
- docker-compose version 1.29.2
31+
- sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o ~/bin/docker-compose
32+
- sudo chmod +x ~/bin/docker-compose
33+
- docker-compose --version
34+
35+
- Terraform v1.3.5
36+
- curl https://releases.hashicorp.com/terraform/1.3.5/terraform_1.3.5_linux_amd64.zip -o "terraform.zip" && unzip terraform.zip
37+
- sudo mv terraform ~/bin/
38+
- terraform --version
39+
40+
- aws-cli/2.0.30
41+
- sudo apt install python3-pip unzip
42+
- curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.0.30.zip" -o "awscliv2.zip" && unzip awscliv2.zip
43+
- ./aws/install -i ~/bin/awscli -b ~/bin
44+
- aws --version
45+
46+
- openjdk 11.0.17
47+
- sudo apt-get install openjdk-11-jdk
48+
- java --version
49+
50+
- VSCode extensions installed for WSL
51+
* Docker
52+
* Java Extension Pack
53+
* HashiCorp Terraform
54+
* Gitlens
55+
* Spring Boot Extension Pack
56+
* MySQL Extension
57+
58+
## Get Started with the Project
59+
1. Clone the Git Repository in WSL
60+
2. Start the Docker
61+
62+
## Creating a springboot project
63+
1. Create a new Spring Project with Maven
64+
2. Dependancies
65+
- Spring JPA for Data
66+
- MySQL Driver
67+
- Spring web
68+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
22
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

couponservice/mvnw

100755100644
File mode changed.

couponservice/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.6.2</version>
8+
<version>2.7.5</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
11-
<groupId>com.ajit.springcloud</groupId>
11+
<groupId>com.ideas.springcloud</groupId>
1212
<artifactId>couponservice</artifactId>
1313
<version>0.0.1-SNAPSHOT</version>
1414
<name>couponservice</name>
15-
<description>Coupon Service</description>
15+
<description>Demo project for Spring Boot</description>
1616
<properties>
1717
<java.version>11</java.version>
1818
</properties>
@@ -27,8 +27,8 @@
2727
</dependency>
2828

2929
<dependency>
30-
<groupId>mysql</groupId>
31-
<artifactId>mysql-connector-java</artifactId>
30+
<groupId>com.mysql</groupId>
31+
<artifactId>mysql-connector-j</artifactId>
3232
<scope>runtime</scope>
3333
</dependency>
3434
<dependency>

couponservice/src/main/java/com/ajit/springcloud/controllers/CouponRestController.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

couponservice/src/main/java/com/ajit/springcloud/model/Coupon.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

couponservice/src/main/java/com/ajit/springcloud/repos/CouponRepo.java

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)