-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from DDD-Community/develop
8차 배포
- Loading branch information
Showing
14 changed files
with
278 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/dissonance/itit/config/MariaDBFullTextDialect.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.dissonance.itit.config; | ||
|
||
import org.hibernate.boot.model.FunctionContributions; | ||
import org.hibernate.dialect.MariaDBDialect; | ||
import org.hibernate.dialect.function.CommonFunctionFactory; | ||
import org.hibernate.type.StandardBasicTypes; | ||
|
||
public class MariaDBFullTextDialect extends MariaDBDialect { | ||
@Override | ||
public void initializeFunctionRegistry(FunctionContributions functionContributions) { | ||
super.initializeFunctionRegistry(functionContributions); | ||
|
||
CommonFunctionFactory commonFunctionFactory = new CommonFunctionFactory(functionContributions); | ||
commonFunctionFactory.windowFunctions(); | ||
commonFunctionFactory.hypotheticalOrderedSetAggregates_windowEmulation(); | ||
|
||
// Full-Text Search 관련 함수 등록 | ||
functionContributions.getFunctionRegistry().registerPattern( | ||
"match_against", | ||
"MATCH(?1, ?2) AGAINST (?3 IN BOOLEAN MODE)", | ||
functionContributions.getTypeConfiguration().getBasicTypeRegistry().resolve(StandardBasicTypes.BOOLEAN) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | ||
|
||
<springProfile name="dev"> | ||
<property resource="application-dev.yml"/> | ||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</springProfile> | ||
<springProfile name="local"> | ||
<property resource="application-local.yml"/> | ||
<springProperty name="DISCORD_WEBHOOK_URL" source="logging.discord.webhook-url"/> | ||
<appender name="DISCORD" class="com.github.napstr.logback.DiscordAppender"> | ||
<webhookUri>${DISCORD_WEBHOOK_URL}</webhookUri> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<pattern>%d{HH:mm:ss} [%thread] [%-5level] %logger{36} - %msg%n```%ex{full}```</pattern> | ||
</layout> | ||
<username>🚨에러 알림🚨</username> | ||
<avatarUrl> | ||
https://img1.daumcdn.net/thumb/R1280x0.fjpg/?fname=http://t1.daumcdn.net/brunch/service/user/cnoC/image/vuyIRQbt6-tQGfW80jNaVS5zjTw | ||
</avatarUrl> | ||
<tts>false</tts> | ||
</appender> | ||
|
||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> | ||
<charset>utf8</charset> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="ASYNC_DISCORD" class="ch.qos.logback.classic.AsyncAppender"> | ||
<appender-ref ref="DISCORD"/> | ||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | ||
<level>ERROR</level> | ||
</filter> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="ASYNC_DISCORD"/> | ||
<appender-ref ref="Console"/> | ||
</root> | ||
</springProfile> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
spring: | ||
datasource: | ||
url: ${DB_URL} | ||
username: ${DB_USER} | ||
password: ${DB_PASSWORD} | ||
hikari: | ||
connection-timeout: 2000 | ||
maximum-pool-size: 10 | ||
driver-class-name: org.mariadb.jdbc.Driver | ||
jpa: | ||
hibernate: | ||
ddl-auto: validate | ||
show-sql: true | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
dialect: com.dissonance.itit.config.MariaDBFullTextDialect | ||
defer-datasource-initialization: false | ||
servlet: | ||
multipart: | ||
max-request-size: 10MB | ||
max-file-size: 10MB | ||
data: | ||
redis: | ||
port: ${REDIS_PORT} | ||
host: ${REDIS_HOST} | ||
|
||
jwt: | ||
token: | ||
secret-key: ${JWT_SECRET} | ||
|
||
logging: | ||
level: | ||
org: | ||
hibernate: | ||
type: debug | ||
stat: debug | ||
discord: | ||
webhook-url: ${DISCORD_WEBHOOK_URL} | ||
config: classpath:logback.xml | ||
|
||
cloud: | ||
aws: | ||
s3: | ||
bucket: itit-bucket | ||
region: | ||
static: ap-northeast-2 | ||
stack: | ||
auto: false | ||
credentials: | ||
access-key: ${AWS_ACCESS_KEY} | ||
secret-key: ${AWS_SECRET_KEY} |
Oops, something went wrong.