Skip to content

Commit

Permalink
Merge PR assignment
Browse files Browse the repository at this point in the history
#1/feat/assignment
  • Loading branch information
downfa11 authored Dec 13, 2024
2 parents 6c5a9c4 + cb2df27 commit 3d6d57c
Show file tree
Hide file tree
Showing 49 changed files with 1,738 additions and 1 deletion.
169 changes: 169 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,172 @@ out/

### VS Code ###
.vscode/
db/data/\#ib_16384_0.dblwr
db/data/\#ib_16384_1.dblwr
db/data/\#innodb_redo/\#ib_redo10_tmp
db/data/\#innodb_redo/\#ib_redo11_tmp
db/data/\#innodb_redo/\#ib_redo12_tmp
db/data/\#innodb_redo/\#ib_redo13_tmp
db/data/\#innodb_redo/\#ib_redo14_tmp
db/data/\#innodb_redo/\#ib_redo15_tmp
db/data/\#innodb_redo/\#ib_redo16_tmp
db/data/\#innodb_redo/\#ib_redo17_tmp
db/data/\#innodb_redo/\#ib_redo18_tmp
db/data/\#innodb_redo/\#ib_redo19_tmp
db/data/\#innodb_redo/\#ib_redo20_tmp
db/data/\#innodb_redo/\#ib_redo21_tmp
db/data/\#innodb_redo/\#ib_redo22_tmp
db/data/\#innodb_redo/\#ib_redo23_tmp
db/data/\#innodb_redo/\#ib_redo24_tmp
db/data/\#innodb_redo/\#ib_redo25_tmp
db/data/\#innodb_redo/\#ib_redo26_tmp
db/data/\#innodb_redo/\#ib_redo27_tmp
db/data/\#innodb_redo/\#ib_redo28_tmp
db/data/\#innodb_redo/\#ib_redo29_tmp
db/data/\#innodb_redo/\#ib_redo30_tmp
db/data/\#innodb_redo/\#ib_redo31_tmp
db/data/\#innodb_redo/\#ib_redo32_tmp
db/data/\#innodb_redo/\#ib_redo33_tmp
db/data/\#innodb_redo/\#ib_redo34_tmp
db/data/\#innodb_redo/\#ib_redo35_tmp
db/data/\#innodb_redo/\#ib_redo36_tmp
db/data/\#innodb_redo/\#ib_redo37_tmp
db/data/\#innodb_redo/\#ib_redo38_tmp
db/data/\#innodb_redo/\#ib_redo39_tmp
db/data/\#innodb_redo/\#ib_redo40_tmp
db/data/\#innodb_redo/\#ib_redo9
db/data/auto.cnf
db/data/binlog.000001
db/data/binlog.000002
db/data/binlog.index
db/data/ca-key.pem
db/data/ca.pem
db/data/client-cert.pem
db/data/client-key.pem
db/data/ib_buffer_pool
db/data/ibdata1
db/data/mysql.ibd
db/data/mysql.sock
db/data/mysql/general_log.CSM
db/data/mysql/general_log.CSV
db/data/mysql/general_log_213.sdi
db/data/mysql/slow_log.CSM
db/data/mysql/slow_log.CSV
db/data/mysql/slow_log_214.sdi
db/data/performance_schema/accounts_145.sdi
db/data/performance_schema/binary_log_trans_189.sdi
db/data/performance_schema/cond_instances_82.sdi
db/data/performance_schema/data_lock_waits_161.sdi
db/data/performance_schema/data_locks_160.sdi
db/data/performance_schema/error_log_83.sdi
db/data/performance_schema/events_errors_su_139.sdi
db/data/performance_schema/events_errors_su_140.sdi
db/data/performance_schema/events_errors_su_141.sdi
db/data/performance_schema/events_errors_su_142.sdi
db/data/performance_schema/events_errors_su_143.sdi
db/data/performance_schema/events_stages_cu_111.sdi
db/data/performance_schema/events_stages_hi_112.sdi
db/data/performance_schema/events_stages_hi_113.sdi
db/data/performance_schema/events_stages_su_114.sdi
db/data/performance_schema/events_stages_su_115.sdi
db/data/performance_schema/events_stages_su_116.sdi
db/data/performance_schema/events_stages_su_117.sdi
db/data/performance_schema/events_stages_su_118.sdi
db/data/performance_schema/events_statement_119.sdi
db/data/performance_schema/events_statement_120.sdi
db/data/performance_schema/events_statement_121.sdi
db/data/performance_schema/events_statement_122.sdi
db/data/performance_schema/events_statement_123.sdi
db/data/performance_schema/events_statement_124.sdi
db/data/performance_schema/events_statement_125.sdi
db/data/performance_schema/events_statement_126.sdi
db/data/performance_schema/events_statement_127.sdi
db/data/performance_schema/events_statement_128.sdi
db/data/performance_schema/events_statement_129.sdi
db/data/performance_schema/events_statement_130.sdi
db/data/performance_schema/events_transacti_131.sdi
db/data/performance_schema/events_transacti_132.sdi
db/data/performance_schema/events_transacti_133.sdi
db/data/performance_schema/events_transacti_134.sdi
db/data/performance_schema/events_transacti_135.sdi
db/data/performance_schema/events_transacti_136.sdi
db/data/performance_schema/events_transacti_137.sdi
db/data/performance_schema/events_transacti_138.sdi
db/data/performance_schema/events_waits_cur_84.sdi
db/data/performance_schema/events_waits_his_85.sdi
db/data/performance_schema/events_waits_his_86.sdi
db/data/performance_schema/events_waits_sum_87.sdi
db/data/performance_schema/events_waits_sum_88.sdi
db/data/performance_schema/events_waits_sum_89.sdi
db/data/performance_schema/events_waits_sum_90.sdi
db/data/performance_schema/events_waits_sum_91.sdi
db/data/performance_schema/events_waits_sum_92.sdi
db/data/performance_schema/file_instances_93.sdi
db/data/performance_schema/file_summary_by__94.sdi
db/data/performance_schema/file_summary_by__95.sdi
db/data/performance_schema/global_status_181.sdi
db/data/performance_schema/global_variables_184.sdi
db/data/performance_schema/host_cache_96.sdi
db/data/performance_schema/hosts_146.sdi
db/data/performance_schema/keyring_componen_191.sdi
db/data/performance_schema/keyring_keys_152.sdi
db/data/performance_schema/log_status_174.sdi
db/data/performance_schema/memory_summary_b_154.sdi
db/data/performance_schema/memory_summary_b_155.sdi
db/data/performance_schema/memory_summary_b_156.sdi
db/data/performance_schema/memory_summary_b_157.sdi
db/data/performance_schema/memory_summary_g_153.sdi
db/data/performance_schema/metadata_locks_159.sdi
db/data/performance_schema/mutex_instances_97.sdi
db/data/performance_schema/objects_summary__98.sdi
db/data/performance_schema/performance_time_99.sdi
db/data/performance_schema/persisted_variab_187.sdi
db/data/performance_schema/prepared_stateme_175.sdi
db/data/performance_schema/processlist_100.sdi
db/data/performance_schema/replication_appl_165.sdi
db/data/performance_schema/replication_appl_166.sdi
db/data/performance_schema/replication_appl_167.sdi
db/data/performance_schema/replication_appl_168.sdi
db/data/performance_schema/replication_appl_170.sdi
db/data/performance_schema/replication_appl_171.sdi
db/data/performance_schema/replication_asyn_172.sdi
db/data/performance_schema/replication_asyn_173.sdi
db/data/performance_schema/replication_conn_162.sdi
db/data/performance_schema/replication_conn_164.sdi
db/data/performance_schema/replication_grou_163.sdi
db/data/performance_schema/replication_grou_169.sdi
db/data/performance_schema/rwlock_instances_101.sdi
db/data/performance_schema/session_account__151.sdi
db/data/performance_schema/session_connect__150.sdi
db/data/performance_schema/session_status_182.sdi
db/data/performance_schema/session_variable_185.sdi
db/data/performance_schema/setup_actors_102.sdi
db/data/performance_schema/setup_consumers_103.sdi
db/data/performance_schema/setup_instrument_104.sdi
db/data/performance_schema/setup_objects_105.sdi
db/data/performance_schema/setup_threads_106.sdi
db/data/performance_schema/socket_instances_147.sdi
db/data/performance_schema/socket_summary_b_148.sdi
db/data/performance_schema/socket_summary_b_149.sdi
db/data/performance_schema/status_by_accoun_177.sdi
db/data/performance_schema/status_by_host_178.sdi
db/data/performance_schema/status_by_thread_179.sdi
db/data/performance_schema/status_by_user_180.sdi
db/data/performance_schema/table_handles_158.sdi
db/data/performance_schema/table_io_waits_s_107.sdi
db/data/performance_schema/table_io_waits_s_108.sdi
db/data/performance_schema/table_lock_waits_109.sdi
db/data/performance_schema/threads_110.sdi
db/data/performance_schema/tls_channel_stat_190.sdi
db/data/performance_schema/user_defined_fun_188.sdi
db/data/performance_schema/user_variables_b_176.sdi
db/data/performance_schema/users_144.sdi
db/data/performance_schema/variables_by_thr_183.sdi
db/data/performance_schema/variables_info_186.sdi
db/data/private_key.pem
db/data/public_key.pem
db/data/server-cert.pem
db/data/server-key.pem
db/data/sys/sys_config.ibd
db/data/undo_001
db/data/undo_002
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM openjdk:17-slim
EXPOSE 8080
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
LABEL authors="jks83"

ENTRYPOINT ["java", "-jar", "/app.jar"]
60 changes: 59 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
id 'com.palantir.docker' version '0.35.0'
}

group = 'com.ns'
version = '0.0.1-SNAPSHOT'
version = '0.0.1'

java {
toolchain {
Expand All @@ -29,12 +36,63 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'

//json
implementation 'com.googlecode.json-simple:json-simple:1.1.1'

//Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'

implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '4.4.1.201607150455-r'
implementation 'software.amazon.awssdk:ecr:2.20.5'

compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

//QueryDSL
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

implementation "com.querydsl:querydsl-core"
implementation "com.querydsl:querydsl-collections"
}

// QueryDSL
// Querydsl 설정부
def generated = 'src/main/generated'

// querydsl QClass 파일 생성 위치를 지정
tasks.withType(JavaCompile) {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}

// java source set 에 querydsl QClass 위치 추가
sourceSets {
main.java.srcDirs += [ generated ]
}

// gradle clean 시에 QClass 디렉토리 삭제
clean {
delete file(generated)
}


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

docker {
println(tasks.bootJar.outputs.files)
name project.name+":"+version
dockerfile file('./Dockerfile')
files tasks.bootJar.outputs.files
buildArgs(['JAR_FILE':tasks.bootJar.outputs.files.singleFile.name])
}

tasks.named('test') {
Expand Down
45 changes: 45 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: '3'
services:

mysql:
image: mysql:8.0
networks:
- solve_network
volumes:
- ./db/conf.d:/etc/mysql/conf.d
- ./db/data:/var/lib/mysql
- ./db/initdb.d:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
environment:
- TZ=Asia/Seoul
- MYSQL_ROOT_PASSWORD=rootpw
- MYSQL_USER=mysqluser
- MYSQL_PASSWORD=mysqlpw
- MYSQL_HOST=localhost
- MYSQL_PORT=3306
- MYSQL_DATABASE=solve

solve:
image: solve:0.0.1
networks:
- solve_network
ports:
- "8080:8080"
depends_on:
- mysql
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/solve?useSSL=false&allowPublicKeyRetrieval=true
- SPRING_DATASOURCE_USERNAME=mysqluser
- SPRING_DATASOURCE_PASSWORD=mysqlpw
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- KAKAO_CLIENT_ID=
- KAKAO_CLIENT_SECRET=
- KAKAO_REDIRECT_URL=http://localhost/kakao/callback
- NAVER_CLIENT_ID=
- NAVER_CLIENT_SECRET=
- NAVER_REDIRECT_URL=naver/callback

networks:
solve_network:
driver: bridge
47 changes: 47 additions & 0 deletions src/main/generated/com/ns/solve/Domain/QAssignment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.ns.solve.Domain;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;


/**
* QAssignment is a Querydsl query type for Assignment
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QAssignment extends EntityPathBase<Assignment> {

private static final long serialVersionUID = 1428616620L;

public static final QAssignment assignment = new QAssignment("assignment");

public final NumberPath<Long> assignmentId = createNumber("assignmentId", Long.class);

public final MapPath<String, String, StringPath> caseAccuracy = this.<String, String, StringPath>createMap("caseAccuracy", String.class, String.class, StringPath.class);

public final StringPath detail = createString("detail");

public final StringPath gitRepository = createString("gitRepository");

public final NumberPath<Long> membershipId = createNumber("membershipId", Long.class);

public final NumberPath<Long> problemId = createNumber("problemId", Long.class);

public QAssignment(String variable) {
super(Assignment.class, forVariable(variable));
}

public QAssignment(Path<? extends Assignment> path) {
super(path.getType(), path.getMetadata());
}

public QAssignment(PathMetadata metadata) {
super(Assignment.class, metadata);
}

}

Loading

0 comments on commit 3d6d57c

Please sign in to comment.