Skip to content

Commit acc32b9

Browse files
authored
Merge pull request #636 from JNU-econovation/refactor/#584
[BE/REFACTOR] build.gradle 파일에서 사용하지 않는 의존성 제거
2 parents 575b688 + abd2844 commit acc32b9

File tree

21 files changed

+95
-360
lines changed

21 files changed

+95
-360
lines changed

build.gradle

Lines changed: 26 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
1-
// Querydsl 버전 plugins
2-
buildscript {
3-
ext {
4-
queryDslVersion = "5.0.0"
5-
}
6-
}
7-
81
plugins {
92
id 'java'
10-
id 'org.springframework.boot' version '2.7.11'
11-
id 'io.spring.dependency-management' version '1.1.4'
12-
id "org.asciidoctor.jvm.convert" version "3.3.2"
13-
id "me.champeau.jmh" version "0.7.2"
14-
id 'com.diffplug.spotless' version '6.23.3'
3+
id 'org.springframework.boot' version "${springBootVersion}"
4+
id 'io.spring.dependency-management' version "${springDependencyManagementVersion}"
5+
id 'com.diffplug.spotless' version "${spotlessVersion}"
156
id 'jacoco'
167
}
178

18-
group = 'com.gaebaljip'
19-
version = '1.0.0'
9+
group = "${projectGroup}"
10+
version = "${applicationVersion}"
2011

2112
java {
22-
sourceCompatibility = '17'
23-
}
24-
25-
configurations {
26-
asciidoctorExt
27-
compileOnly {
28-
extendsFrom annotationProcessor
29-
}
13+
sourceCompatibility = "${javaVersion}"
3014
}
3115

3216
repositories {
@@ -41,10 +25,11 @@ dependencies {
4125
implementation 'org.springframework.boot:spring-boot-starter-validation'
4226
implementation 'org.springframework.boot:spring-boot-starter-web'
4327
implementation 'org.springframework.boot:spring-boot-starter-security'
28+
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
4429

4530
// database
4631
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
47-
testImplementation 'org.projectlombok:lombok:1.18.26'
32+
testImplementation 'org.projectlombok:lombok'
4833
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
4934
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
5035

@@ -55,54 +40,42 @@ dependencies {
5540
//test
5641
testImplementation 'org.springframework.boot:spring-boot-starter-test'
5742
testImplementation 'org.springframework.security:spring-security-test'
58-
testImplementation "org.testcontainers:mariadb:1.19.8"
59-
testImplementation "org.testcontainers:testcontainers:1.19.8"
60-
testImplementation "org.testcontainers:junit-jupiter:1.19.8"
61-
testImplementation "org.testcontainers:localstack:1.19.8"
62-
testImplementation "org.jeasy:easy-random-core:5.0.0"
63-
43+
testImplementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
44+
testImplementation "org.testcontainers:mariadb:${testContainersVersion}"
45+
testImplementation "org.testcontainers:testcontainers:${testContainersVersion}"
46+
testImplementation "org.testcontainers:junit-jupiter:${testContainersVersion}"
47+
testImplementation "org.testcontainers:localstack:${testContainersVersion}"
48+
testImplementation "org.jeasy:easy-random-core:${easyRandomVersion}"
6449

6550

6651
// querydsl
6752
implementation 'com.querydsl:querydsl-jpa'
6853
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
6954

7055
// s3
71-
implementation 'io.awspring.cloud:spring-cloud-aws-s3:3.0.2'
56+
implementation "io.awspring.cloud:spring-cloud-aws-s3:${s3Version}"
7257

7358

7459
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
7560
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
7661

7762
// jwt
78-
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'
79-
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5'
80-
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5'
81-
82-
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
83-
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
63+
implementation "io.jsonwebtoken:jjwt-api:${jjwtVersion}"
64+
runtimeOnly "io.jsonwebtoken:jjwt-impl:${jjwtVersion}"
65+
runtimeOnly "io.jsonwebtoken:jjwt-jackson:${jjwtVersion}"
8466

8567
//email
86-
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
87-
implementation group: 'software.amazon.awssdk', name: 'ses', version: "2.19.29"
88-
implementation 'com.sun.mail:javax.mail:1.6.2'
89-
90-
testImplementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
68+
implementation "software.amazon.awssdk:ses:${sesVersion}"
69+
implementation "com.sun.mail:javax.mail:${javaxMailVersion}"
9170

9271
//Swagger
93-
implementation 'org.springdoc:springdoc-openapi-ui:1.6.11'
94-
95-
//OpenCsv
96-
implementation group: 'com.opencsv', name: 'opencsv', version: '5.7.1'
97-
98-
// Actuator
99-
implementation 'org.springframework.boot:spring-boot-starter-actuator'
72+
implementation "org.springdoc:springdoc-openapi-ui:${swaggerVersion}"
10073

101-
// Prometheus
102-
implementation 'io.micrometer:micrometer-registry-prometheus'
74+
// OpenCsv
75+
implementation "com.opencsv:opencsv:${opencsvVersion}"
10376

104-
// quartz
105-
implementation group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
77+
// Quartz
78+
implementation "org.quartz-scheduler:quartz:${quartzVersion}"
10679
}
10780

10881
tasks.named('bootBuildImage') {
@@ -127,57 +100,10 @@ clean.doLast {
127100
file(querydslDir).deleteDir()
128101
}
129102

130-
ext {
131-
snippetsDir = file('build/generated-snippets')
132-
}
133-
134-
test {
135-
outputs.dir snippetsDir
136-
finalizedBy jacocoTestReport
137-
}
138-
139-
asciidoctor {
140-
inputs.dir snippetsDir
141-
configurations 'asciidoctorExt'
142-
dependsOn test
143-
}
144-
145-
bootJar {
146-
dependsOn asciidoctor
147-
from ("${asciidoctor.outputDir}/html5") {
148-
into 'static/docs'
149-
}
150-
}
151-
152-
asciidoctor.doFirst { //(6) asciidoctor가 실행될 때 docs 하위 파일 삭제
153-
delete file('src/main/resources/static/docs')
154-
}
155-
156-
bootJar { //(7) bootJar 시 asciidoctor 종속되고 build하위 스니펫츠 파일을 classes 하위로 복사
157-
dependsOn asciidoctor
158-
copy {
159-
from "${asciidoctor.outputDir}"
160-
into 'BOOT-INF/classes/static/docs'
161-
}
162-
}
163-
164-
task copyDocument(type: Copy) { //(8) from의 파일을 into로 복사
165-
dependsOn asciidoctor
166-
from file("build/docs/asciidoc")
167-
into file("src/main/resources/static/docs")
168-
}
169-
170-
build { //(9) build 시 copyDocument 실행
171-
dependsOn copyDocument
172-
}
173103
tasks.named('compileJava') {
174104
dependsOn 'spotlessApply'
175105
}
176106

177-
jar {
178-
enabled = false
179-
}
180-
181107
spotless {
182108
java {
183109
// Google Java 포맷 적용
@@ -262,4 +188,4 @@ jacocoTestCoverageVerification {
262188
]
263189
}
264190
}
265-
}
191+
}

docker-compose-monitoring.yml

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

gradle.properties

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### Application Version ###
2+
applicationVersion=1.0.0
3+
4+
### Project Configs ###
5+
projectGroup=com.gaebaljip
6+
javaVersion=17
7+
8+
### Spring Dependencies ###
9+
springBootVersion=2.7.11
10+
springDependencyManagementVersion=1.1.4
11+
12+
### QueryDSL ###
13+
queryDSLVersion=5.0.0
14+
15+
### TestContainer ###
16+
testContainersVersion=1.19.8
17+
18+
## ?? ##
19+
spotlessVersion=6.23.3
20+
easyRandomVersion=5.0.0
21+
quartzVersion=2.3.2
22+
opencsvVersion=5.7.1
23+
swaggerVersion=1.6.11
24+
javaxMailVersion=1.6.2
25+
sesVersion=2.19.29
26+
jjwtVersion=0.11.5
27+
s3Version=3.0.2

resources/gaebaljip-local-environment/prometheus/config/prometheus.yml

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

resources/gaebaljip-prod-environment/prometheus/config/prometheus.yml

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

src/main/java/com/gaebaljip/exceed/common/health/HealthController.java

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

src/main/java/com/gaebaljip/exceed/common/log/LoggingFilter.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@
2222
public class LoggingFilter extends OncePerRequestFilter {
2323
public static final String SWAGGER_URI = "/swagger-ui";
2424
private static final List<String> excludeUrl =
25-
List.of(
26-
"/actuator/health",
27-
"/actuator/prometheus",
28-
"/v1/health",
29-
"/api-docs/swagger-config",
30-
"/api-docs",
31-
"/favicon.ico");
25+
List.of("/v1/health", "/api-docs/swagger-config", "/api-docs", "/favicon.ico");
3226

3327
@Override
3428
protected void doFilterInternal(
@@ -53,7 +47,7 @@ protected void doFilterInternal(
5347
httpServletRequest, httpServletResponse, stopWatch.getTotalTimeSeconds());
5448
log.info("{}", httpLogMessage);
5549

56-
httpServletResponse.copyBodyToResponse(); // 다시한번 더 바디를 채워준다.
50+
httpServletResponse.copyBodyToResponse();
5751

5852
MDC.remove(LogKey.KEY);
5953
}

src/main/java/com/gaebaljip/exceed/common/security/config/SecurityConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6565
.antMatchers(
6666
HttpMethod.GET,
6767
"/v1/members/email/checked",
68-
"/actuator/**",
6968
"/v1/health",
7069
"/v1//findPassword-redirect",
7170
"/v1/signUp-redirect",

src/main/java/com/gaebaljip/exceed/common/security/filter/JwtAuthenticationFilter.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import java.io.IOException;
66
import java.time.LocalDateTime;
7-
import java.util.List;
87

98
import javax.servlet.FilterChain;
109
import javax.servlet.ServletException;
@@ -36,7 +35,6 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
3635
private final JwtResolver jwtResolver;
3736
private final MemberDetailService memberDetailService;
3837
private final SpringEnvironmentHelper springEnvironmentHelper;
39-
private final List<String> excludeUrl = List.of("/actuator", "/v1/health");
4038

4139
@Override
4240
protected void doFilterInternal(
@@ -87,18 +85,6 @@ && isSwaggerRequest(request)) {
8785
filterChain.doFilter(request, response);
8886
}
8987

90-
@Override
91-
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
92-
String path = request.getRequestURI();
93-
boolean flag = false;
94-
for (String url : excludeUrl) {
95-
if (path.contains(url)) {
96-
flag = true;
97-
}
98-
}
99-
return flag;
100-
}
101-
10288
private boolean isSwaggerRequest(HttpServletRequest request) {
10389
String servletPath = request.getServletPath();
10490
return PatternMatchUtils.simpleMatch(SwaggerPatterns, servletPath);

src/main/java/com/gaebaljip/exceed/config/ActuatorConfig.java

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

0 commit comments

Comments
 (0)