From 828a7e5ccc9478f4c9777d2ca5de60ff708b8bf1 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Mon, 11 Jul 2022 16:34:54 +0900 Subject: [PATCH] feat: sql log format fix --- build.gradle | 48 +++++++++++++++++++ .../com/xit/core/config/WebCommonConfig.java | 18 +++---- .../sql/parser/sqlQuery/BasicSqlQuery.java | 7 +-- .../resources/config/application-oauth.yml | 2 +- 4 files changed, 62 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index 9613935..15a9317 100644 --- a/build.gradle +++ b/build.gradle @@ -241,3 +241,51 @@ test { exclude '**/*' //useJUnitPlatform() } + + +/* +def frontendDir = "../xit-opst-fo" + +sourceSets { + main { + resources { + srcDirs = ["$projectDir/src/main/resources"] + } + } +} + +processResources { + dependsOn "copyReactBuildFiles" +} + +task installReact(type: Exec) { + workingDir "$frontendDir" + inputs.dir "$frontendDir" + group = BasePlugin.BUILD_GROUP + if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) { + commandLine "npm.cmd", "audit", "fix" + commandLine 'npm.cmd', 'install' + } else { + commandLine "npm", "audit", "fix" + commandLine 'npm', 'install' + } +} + +task buildReact(type: Exec) { + dependsOn "installReact" + workingDir "$frontendDir" + inputs.dir "$frontendDir" + group = BasePlugin.BUILD_GROUP + if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) { + commandLine "npm.cmd", "run-script", "build" + } else { + commandLine "npm", "run-script", "build" + } +} + +task copyReactBuildFiles(type: Copy) { + dependsOn "buildReact" + from "$frontendDir/build" + into "$buildDir/resources/main/static" +} +*/ \ No newline at end of file diff --git a/src/main/java/com/xit/core/config/WebCommonConfig.java b/src/main/java/com/xit/core/config/WebCommonConfig.java index 1d12a42..3a2d77b 100644 --- a/src/main/java/com/xit/core/config/WebCommonConfig.java +++ b/src/main/java/com/xit/core/config/WebCommonConfig.java @@ -178,15 +178,15 @@ public class WebCommonConfig extends AsyncConfigurerSupport implements WebMvcCon * * @see SecurityConfig#corsConfigurationSource() */ - @Override - public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**") - .allowedOrigins(corsProperties.getAllowedOrigins()) - .allowedMethods(corsProperties.getAllowedMethods()) - .allowedHeaders(corsProperties.getAllowedHeaders()) - .allowCredentials(true) - .maxAge(3600); - } +// @Override +// public void addCorsMappings(CorsRegistry registry) { +// registry.addMapping("/**") +// .allowedOrigins(corsProperties.getAllowedOrigins()) +// .allowedMethods(corsProperties.getAllowedMethods()) +// .allowedHeaders(corsProperties.getAllowedHeaders()) +// .allowCredentials(true) +// .maxAge(3600); +// } //--------------------------------------------------------------------------- // yaml type Message loading diff --git a/src/main/java/com/xit/core/support/sql/parser/sqlQuery/BasicSqlQuery.java b/src/main/java/com/xit/core/support/sql/parser/sqlQuery/BasicSqlQuery.java index d953c98..a4638e1 100644 --- a/src/main/java/com/xit/core/support/sql/parser/sqlQuery/BasicSqlQuery.java +++ b/src/main/java/com/xit/core/support/sql/parser/sqlQuery/BasicSqlQuery.java @@ -123,9 +123,10 @@ public class BasicSqlQuery implements SqlQuery { @Override public String getQueryString() { SqlNode rootSqlNode = SimpleSqlNodeFactory.getSqlNode(element, parameterMap); - return rootSqlNode.getFullText().trim() - .replaceAll(System.lineSeparator(), " ") - .replaceAll(" +", " "); + return rootSqlNode.getFullText(); +// return rootSqlNode.getFullText().trim() +// .replaceAll(System.lineSeparator(), " ") +// .replaceAll(" +", " "); } private String prevProcessValue(String value) { diff --git a/src/main/resources/config/application-oauth.yml b/src/main/resources/config/application-oauth.yml index 98279bb..863d8c9 100644 --- a/src/main/resources/config/application-oauth.yml +++ b/src/main/resources/config/application-oauth.yml @@ -68,7 +68,7 @@ spring: # Spring Security cors 설정 :: CorsConfiguration 설정 값 cors: - allowed-origins: http://localhost:3000,http://localhost,http://211.119.124.107,http://211.119.124.107:3000 + allowed-origins: https://fonts.gstatic.com,http://localhost:3000,http://localhost,http://211.119.124.107,http://211.119.124.107:3000 allowed-methods: GET,POST,PUT,DELETE,OPTIONS allowed-headers: '*' max-age: 3600