diff --git a/.gitmodules b/.gitmodules
index 5ad3462f2..3c09b9341 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,15 +2,3 @@
path = backend/src/main/resources/config
url = git@github.com:zzimkkong/config.git
branch = main
-[submodule "s3proxy/src/main/resources/s3proxy-config"]
- path = s3proxy/src/main/resources/s3proxy-config
- url = git@github.com:zzimkkong/s3proxy-config.git
- branch = main
-[submodule "backend/src/main/resources/infra-appender"]
- path = backend/src/main/resources/infra-appender
- url = git@github.com:zzimkkong/infra-appender.git
- branch = main
-[submodule "s3proxy/src/main/resources/config"]
- path = s3proxy/src/main/resources/config
- url = git@github.com:zzimkkong/config.git
- branch = main
diff --git a/backend/build.gradle b/backend/build.gradle
index 75d5b6282..304f0ea30 100644
--- a/backend/build.gradle
+++ b/backend/build.gradle
@@ -3,8 +3,6 @@ plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "org.asciidoctor.convert" version "1.5.10"
id 'java'
- id 'jacoco'
- id "org.sonarqube" version "3.3"
}
group = 'com.woowacourse'
@@ -26,10 +24,6 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
- // Redis
- implementation 'org.springframework.boot:spring-boot-starter-data-redis'
- implementation 'org.springframework.boot:spring-boot-starter-cache:2.5.4'
-
// Security
implementation 'org.springframework.boot:spring-boot-starter-security'
testImplementation 'org.springframework.security:spring-security-test'
@@ -52,12 +46,6 @@ dependencies {
// Jwt
implementation 'io.jsonwebtoken:jjwt:0.9.1'
- // SvgToPng
- implementation 'org.apache.xmlgraphics:batik-all:1.12'
- implementation 'org.apache.xmlgraphics:xmlgraphics-commons:2.4'
- implementation 'xml-apis:xml-apis:1.4.01'
- implementation 'xml-apis:xml-apis-ext:1.3.04'
-
// Cryptor
implementation 'commons-codec:commons-codec:1.15'
@@ -75,9 +63,6 @@ dependencies {
// Logstash
implementation 'net.logstash.logback:logstash-logback-encoder:6.6'
- // Kafka Appender
- implementation 'com.github.danielwegener:logback-kafka-appender:0.2.0-RC2'
-
// Reflections
implementation 'org.reflections:reflections:0.9.11'
}
@@ -85,10 +70,6 @@ dependencies {
test {
outputs.dir snippetsDir
useJUnitPlatform()
- jacoco {
- destinationFile = file("$buildDir/jacoco/jacoco.exec")
- }
- finalizedBy jacocoTestReport
}
asciidoctor {
@@ -108,56 +89,3 @@ bootJar {
into 'static/docs'
}
}
-
-jacocoTestReport {
- reports {
- html.enabled true
- xml.enabled true
- csv.enabled false
- }
- finalizedBy jacocoTestCoverageVerification
-}
-
-jacocoTestCoverageVerification {
- violationRules {
- rule {
- element = 'CLASS'
- excludes = ["**.exception.**", "**.ControllerAdvice", "**.*ErrorResponse", "**.ValidatorMessage",
- "**.ZzimkkongApplication", "**.DataLoader", "**.config.**",
- "**.LoginInterceptor", "**.AuthenticationPrincipalArgumentResolver",
- "**.slack.**", "**.Slack*", "**.AdminPageController", "**.Warmer*"]
-
- limit {
- counter = 'BRANCH'
- value = 'COVEREDRATIO'
- minimum = 1.0
- }
-
- limit {
- counter = 'INSTRUCTION'
- value = 'COVEREDRATIO'
- minimum = 0.9
- }
- }
- }
-}
-
-project.tasks["jacocoTestCoverageVerification"].finalizedBy "sonarqube"
-sonarqube {
- def sonarProperties = new Properties()
- sonarProperties.load(new FileInputStream(file("src/main/resources/config/sonar.properties")))
- def sonarToken = sonarProperties.getProperty("SONAR_TOKEN")
-
- properties {
- property "sonar.host.url", "http://zzimkkong-service.o-r.kr:8000"
- property "sonar.login", sonarToken
- property 'sonar.sources', 'src'
- property 'sonar.language', 'java'
- property 'sonar.projectVersion', '0.0.1-SNAPSHOT'
- property 'sonar.sourceEncoding', 'UTF-8'
- property 'sonar.coverage.jacoco.xmlReportPaths', 'build/reports/jacoco/test/jacocoTestReport.xml'
- property 'sonar.java.binaries', 'build/classes'
- property 'sonar.test.inclusions', '**/*Test.java'
- property 'sonar.exclusions', '**/*Doc*.java, **/resources/**, **/config/datasource/**, **/DataLoader.java, **/Warmer.java'
- }
-}
diff --git a/backend/src/docs/asciidoc/map.adoc b/backend/src/docs/asciidoc/map.adoc
index 42861b9a0..e4b7db0fd 100644
--- a/backend/src/docs/asciidoc/map.adoc
+++ b/backend/src/docs/asciidoc/map.adoc
@@ -35,3 +35,15 @@ include::{snippets}/map/delete/http-response.adoc[]
include::{snippets}/map/getBySharingId/http-request.adoc[]
==== Response
include::{snippets}/map/getBySharingId/http-response.adoc[]
+
+=== 맵별 슬랙알림 url 등록
+==== Request
+include::{snippets}/map/slackPost/http-request.adoc[]
+==== Response
+include::{snippets}/map/slackPost/http-response.adoc[]
+
+=== 맵별 슬랙알림 url 조회
+==== Request
+include::{snippets}/map/slackGet/http-request.adoc[]
+==== Response
+include::{snippets}/map/slackGet/http-response.adoc[]
\ No newline at end of file
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/DataLoader.java b/backend/src/main/java/com/woowacourse/zzimkkong/DataLoader.java
index da635b8b3..9276ee639 100644
--- a/backend/src/main/java/com/woowacourse/zzimkkong/DataLoader.java
+++ b/backend/src/main/java/com/woowacourse/zzimkkong/DataLoader.java
@@ -48,7 +48,7 @@ public void run(String... args) {
new Map(
"루터회관",
"{'id': '1', 'type': 'polyline', 'fill': '', 'stroke': 'rgba(111, 111, 111, 1)', 'points': '['60,250', '1,231', '242,252']', 'd': '[]', 'transform': ''}",
- "https://d1dgzmdd5f1fx6.cloudfront.net/thumbnails-local/1.png",
+ "",
pobi)
);
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/ZzimkkongApplication.java b/backend/src/main/java/com/woowacourse/zzimkkong/ZzimkkongApplication.java
index e45a1d105..f1902de5e 100644
--- a/backend/src/main/java/com/woowacourse/zzimkkong/ZzimkkongApplication.java
+++ b/backend/src/main/java/com/woowacourse/zzimkkong/ZzimkkongApplication.java
@@ -5,10 +5,12 @@
import java.util.TimeZone;
+import static com.woowacourse.zzimkkong.infrastructure.datetime.TimeZoneUtils.UTC;
+
@SpringBootApplication
public class ZzimkkongApplication {
public static void main(String[] args) {
- TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
+ TimeZone.setDefault(UTC);
SpringApplication.run(ZzimkkongApplication.class, args);
}
}
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/config/LogAspectConfig.java b/backend/src/main/java/com/woowacourse/zzimkkong/config/LogAspectConfig.java
deleted file mode 100644
index 29f556200..000000000
--- a/backend/src/main/java/com/woowacourse/zzimkkong/config/LogAspectConfig.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.woowacourse.zzimkkong.config;
-
-import com.woowacourse.zzimkkong.config.logaspect.LogAspectConfigurer;
-import org.reflections.Reflections;
-import org.springframework.context.annotation.Configuration;
-
-import java.util.Set;
-
-@Configuration
-public class LogAspectConfig extends LogAspectConfigurer {
- @Override
- protected void registerBeans(LogRegistry logRegistry) {
- Reflections reflections = new Reflections("com.woowacourse.zzimkkong");
- Set> typesAnnotatedWith = reflections.getTypesAnnotatedWith(com.woowacourse.zzimkkong.config.logaspect.LogRegistry.class);
-
- for (Class> clazz : typesAnnotatedWith) {
- String logGroup = clazz.getAnnotation(com.woowacourse.zzimkkong.config.logaspect.LogRegistry.class).group();
- logRegistry.add(clazz, logGroup);
- }
- }
-}
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/config/LogConfig.java b/backend/src/main/java/com/woowacourse/zzimkkong/config/LogConfig.java
new file mode 100644
index 000000000..b44ec67e3
--- /dev/null
+++ b/backend/src/main/java/com/woowacourse/zzimkkong/config/LogConfig.java
@@ -0,0 +1,21 @@
+package com.woowacourse.zzimkkong.config;
+
+import com.woowacourse.zzimkkong.config.logaspect.LogTraceIdInterceptor;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class LogConfig implements WebMvcConfigurer {
+ private final LogTraceIdInterceptor logTraceIdInterceptor;
+
+ public LogConfig(final LogTraceIdInterceptor logTraceIdInterceptor) {
+ this.logTraceIdInterceptor = logTraceIdInterceptor;
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(logTraceIdInterceptor)
+ .addPathPatterns("/**");
+ }
+}
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/config/S3ProxyConfig.java b/backend/src/main/java/com/woowacourse/zzimkkong/config/S3ProxyConfig.java
deleted file mode 100644
index 68825ba00..000000000
--- a/backend/src/main/java/com/woowacourse/zzimkkong/config/S3ProxyConfig.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.woowacourse.zzimkkong.config;
-
-import com.woowacourse.zzimkkong.infrastructure.thumbnail.S3ProxyUploader;
-import com.woowacourse.zzimkkong.infrastructure.thumbnail.StorageUploader;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.web.reactive.function.client.WebClient;
-
-@Configuration
-@PropertySource("classpath:config/s3proxy.properties")
-public class S3ProxyConfig {
- private final WebClient webClient;
-
- public S3ProxyConfig(final WebClient webClient) {
- this.webClient = webClient;
- }
-
- @Bean(name = "storageUploader")
- @Profile("prod")
- public StorageUploader storageUploaderProd(
- @Value("${s3proxy.server-uri.prod}") final String serverUri,
- @Value("${s3proxy.secret-key.prod}") final String secretKey) {
- return new S3ProxyUploader(serverUri, secretKey, webClient);
- }
-
- @Bean(name = "storageUploader")
- @Profile({"dev", "local", "test"})
- public StorageUploader storageUploaderDev(
- @Value("${s3proxy.server-uri.dev}") final String serverUri,
- @Value("${s3proxy.secret-key.dev}") final String secretKey) {
- return new S3ProxyUploader(serverUri, secretKey, webClient);
- }
-}
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/config/SlackConfig.java b/backend/src/main/java/com/woowacourse/zzimkkong/config/SlackConfig.java
deleted file mode 100644
index 82317f2bc..000000000
--- a/backend/src/main/java/com/woowacourse/zzimkkong/config/SlackConfig.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.woowacourse.zzimkkong.config;
-
-import com.woowacourse.zzimkkong.domain.SlackUrl;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.context.annotation.PropertySource;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-@Configuration
-@PropertySource("classpath:config/slack.properties")
-public class SlackConfig implements WebMvcConfigurer {
- @Bean
- @Profile("prod")
- public SlackUrl slackUrlProd(
- @Value("${slack.webhook.prod}") final String prodUrl) {
- return new SlackUrl(prodUrl);
- }
-
- @Bean
- @Profile({"local", "dev"})
- public SlackUrl slackUrlDev(
- @Value("${slack.webhook.local}") final String devUrl) {
- return new SlackUrl(devUrl);
- }
-
- @Bean
- @Profile("test")
- public SlackUrl slackUrlTest(
- @Value("${slack.webhook.test}") final String testUrl) {
- return new SlackUrl(testUrl);
- }
-}
diff --git a/backend/src/main/java/com/woowacourse/zzimkkong/config/datasource/CustomDataSourceConfig.java b/backend/src/main/java/com/woowacourse/zzimkkong/config/datasource/CustomDataSourceConfig.java
deleted file mode 100644
index 2bec4c289..000000000
--- a/backend/src/main/java/com/woowacourse/zzimkkong/config/datasource/CustomDataSourceConfig.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.woowacourse.zzimkkong.config.datasource;
-
-import com.zaxxer.hikari.HikariDataSource;
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.jdbc.DataSourceBuilder;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
-import org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy;
-import org.springframework.transaction.annotation.EnableTransactionManagement;
-
-import javax.sql.DataSource;
-import java.util.*;
-
-import static com.woowacourse.zzimkkong.config.datasource.ReplicationRoutingDataSource.DATASOURCE_KEY_MASTER;
-import static com.woowacourse.zzimkkong.config.datasource.ReplicationRoutingDataSource.DATASOURCE_KEY_SLAVE;
-
-@Configuration
-@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
-@EnableTransactionManagement
-@EnableJpaRepositories(basePackages = {"com.woowacourse.zzimkkong"})
-@Profile("prod")
-public class CustomDataSourceConfig {
-
- @Bean
- @ConfigurationProperties(prefix = "spring.datasource.hikari.master")
- public DataSource masterDataSource() {
- return DataSourceBuilder.create().type(HikariDataSource.class).build();
- }
-
- @Bean
- @ConfigurationProperties(prefix = "spring.datasource.hikari.slave")
- public DataSource slaveDataSource() {
- return DataSourceBuilder.create().type(HikariDataSource.class).build();
- }
-
- @Bean
- public DataSource routingDataSource(@Qualifier("masterDataSource") DataSource master,
- @Qualifier("slaveDataSource") DataSource slave) {
- ReplicationRoutingDataSource routingDataSource = new ReplicationRoutingDataSource();
-
- HashMap