Skip to content

Commit

Permalink
Merge branch 'backend-dev' into dev/back/admin
Browse files Browse the repository at this point in the history
  • Loading branch information
ytjdud authored May 24, 2024
2 parents a3b91ba + 6d4b1d3 commit 59039db
Show file tree
Hide file tree
Showing 50 changed files with 2,336 additions and 436 deletions.
474 changes: 38 additions & 436 deletions .gitignore

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions exchange-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/


../.idea
../.DS_Store
.DS_Store

.env
14 changes: 14 additions & 0 deletions exchange-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM --platform=linux/amd64 openjdk:17-jdk
#FROM openjdk:17-jdk

LABEL maintainer="ytjdud01@kookmin.ac.kr"

VOLUME /dev-exchange-service

EXPOSE 8000

ARG JAR_FILE=build/libs/exchange-service-0.0.1-SNAPSHOT.jar

COPY ${JAR_FILE} exchange-springboot.jar

ENTRYPOINT ["java", "-jar","/exchange-springboot.jar"]
53 changes: 53 additions & 0 deletions exchange-service/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.10'
id 'io.spring.dependency-management' version '1.1.4'
}

ext {
springCloudVersion = "2022.0.5"
}

group = 'com.capstone2024.sw.kmu'
version = '0.0.1-SNAPSHOT'

java {
sourceCompatibility = '17'
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0"

testImplementation 'org.springframework.boot:spring-boot-starter-test'
runtimeOnly 'com.mysql:mysql-connector-j'

}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion"
}
}

tasks.named('bootBuildImage') {
builder = 'paketobuildpacks/builder-jammy-base:latest'
}

tasks.named('test') {
useJUnitPlatform()
}
33 changes: 33 additions & 0 deletions exchange-service/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: "3.8"

services:
mysql:
image: mysql:8.3.0
container_name: mysql
hostname: mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_HOST=%
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=Asia/Seoul
ports:
- 3306:3306
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql # 'Create databses' sql script as using mutliple databases


app:
build:
context: .
dockerfile: Dockerfile
container_name: dev-exchange
hostname: dev-exchange
ports:
- 8000:8000
env_file:
- .env
links:
- mysql
depends_on:
- mysql
Binary file not shown.
7 changes: 7 additions & 0 deletions exchange-service/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 59039db

Please sign in to comment.