Skip to content

Commit eb03b9c

Browse files
initial commit for project setup
1 parent e0c4e45 commit eb03b9c

21 files changed

+674
-0
lines changed

backend/bookTable/.dockerignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env
2+
docker-compose.yml
3+
*.md
4+
.git
5+
.gitignore
6+
build/
7+
!build/libs/bookTable-0.0.1-SNAPSHOT.jar

backend/bookTable/.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#Global ignores
2+
HELP.md
3+
.DS_Store
4+
.env
5+
6+
# Ignore all Gradle-related files
7+
**/.gradle
8+
**/build/
9+
!**/gradle/wrapper/gradle-wrapper.jar
10+
!**/src/main/**/build/
11+
!**/src/test/**/build/
12+
13+
# STS (Spring Tool Suite) ignores
14+
**/.apt_generated
15+
**/.classpath
16+
**/.factorypath
17+
**/.project
18+
**/.settings
19+
**/.springBeans
20+
**/.sts4-cache
21+
**/bin/
22+
!**/src/main/**/bin/
23+
!**/src/test/**/bin/
24+
25+
# IntelliJ IDEA ignores
26+
**/.idea
27+
**/*.iws
28+
**/*.iml
29+
**/*.ipr
30+
**/out/
31+
!**/src/main/**/out/
32+
!**/src/test/**/out/
33+
34+
# Java build artifacts (for all backend services)
35+
backend/**/target/
36+
backend/**/.mvn/
37+
backend/**/*.log
38+
39+
# Elastic Beanstalk Files
40+
.elasticbeanstalk/*
41+
!.elasticbeanstalk/*.cfg.yml
42+
!.elasticbeanstalk/*.global.yml

backend/bookTable/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Use official openjdk image as base image
2+
FROM openjdk:17-jdk-slim AS base
3+
4+
# Set working directory in container
5+
WORKDIR /app
6+
7+
# Copy the jar file from the target folder to the container
8+
COPY build/libs/bookTable-0.0.1-SNAPSHOT.jar app.jar
9+
10+
# Expose the port Spring Boot is running on
11+
EXPOSE 8080
12+
13+
# Run the application
14+
ENTRYPOINT ["java", "-jar", "app.jar"]

backend/bookTable/Dockerrun.aws.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"AWSEBDockerrunVersion": "1", "Image": {"Name": "061039807046.dkr.ecr.us-west-1.amazonaws.com/booktable-app:latest", "Update": "true"}, "Ports": [{"ContainerPort": 8080, "HostPort": 80}]}

backend/bookTable/app.zip

344 Bytes
Binary file not shown.

backend/bookTable/build.gradle

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
plugins {
2+
id 'java'
3+
id 'org.springframework.boot' version '3.4.3'
4+
id 'io.spring.dependency-management' version '1.1.7'
5+
id 'jacoco'
6+
}
7+
8+
group = 'org.sjsu'
9+
version = '0.0.1-SNAPSHOT'
10+
sourceCompatibility = '17'
11+
12+
java {
13+
toolchain {
14+
languageVersion = JavaLanguageVersion.of(17)
15+
}
16+
}
17+
18+
configurations {
19+
compileOnly {
20+
extendsFrom annotationProcessor
21+
}
22+
}
23+
24+
repositories {
25+
mavenCentral()
26+
}
27+
28+
ext {
29+
set('springCloudVersion', "2024.0.0")
30+
}
31+
32+
jacoco {
33+
toolVersion = "0.8.11"
34+
}
35+
36+
jacocoTestReport {
37+
reports {
38+
html.required = true
39+
xml.required = true
40+
}
41+
}
42+
43+
dependencies {
44+
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
45+
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
46+
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
47+
implementation 'org.springframework.boot:spring-boot-starter-security'
48+
implementation 'org.springframework.boot:spring-boot-starter-web'
49+
implementation 'org.springframework.cloud:spring-cloud-starter-gateway-mvc'
50+
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
51+
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
52+
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
53+
implementation "com.twilio.sdk:twilio:10.6.10"
54+
compileOnly 'org.projectlombok:lombok'
55+
developmentOnly 'org.springframework.boot:spring-boot-devtools'
56+
runtimeOnly 'com.mysql:mysql-connector-j'
57+
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
58+
annotationProcessor 'org.projectlombok:lombok'
59+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
60+
testImplementation 'org.springframework.security:spring-security-test'
61+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
62+
}
63+
64+
dependencyManagement {
65+
imports {
66+
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
67+
}
68+
}
69+
70+
tasks.named('bootBuildImage') {
71+
builder = 'paketobuildpacks/builder-jammy-base:latest'
72+
}
73+
74+
tasks.named('test') {
75+
useJUnitPlatform()
76+
}
77+
78+
jacocoTestCoverageVerification {
79+
violationRules {
80+
rule {
81+
limit {
82+
minimum = 0.7 // Require 70% coverage
83+
}
84+
}
85+
}
86+
}
87+
88+
check.dependsOn jacocoTestCoverageVerification
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)