-
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 #18 from heesane/main
Syncronized
- Loading branch information
Showing
6 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 5 additions & 1 deletion
6
back/home_server/api-module/src/main/java/hhs/server/api/ApiApplication.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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
package hhs.server.api; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.slf4j.MDC; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.autoconfigure.domain.EntityScan; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | ||
|
||
|
||
@Slf4j | ||
@ComponentScan(basePackages = "hhs.server") | ||
@EntityScan(basePackages = "hhs.server.domain") | ||
@EnableJpaRepositories(basePackages = "hhs.server.domain.repository") | ||
@SpringBootApplication | ||
public class ApiApplication { | ||
public static void main(String[] args) { | ||
MDC.put("moduleName","API"); | ||
log.info("Starting API module"); | ||
SpringApplication.run(ApiApplication.class, args); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
back/home_server/batch-module/src/main/java/hhs/server/batch/BatchApplication.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 |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package hhs.server.batch; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.slf4j.MDC; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.autoconfigure.domain.EntityScan; | ||
|
||
@Slf4j | ||
@EntityScan(basePackages = {"hhs.server.domain", "hhs.server.common"}) | ||
@SpringBootApplication(scanBasePackages = "hhs.server") | ||
public class BatchApplication { | ||
public static void main(String[] args) { | ||
MDC.put("moduleName","BATCH"); | ||
log.info("Starting Batch module"); | ||
SpringApplication.run(BatchApplication.class, args); | ||
} | ||
} |
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
29 changes: 29 additions & 0 deletions
29
back/home_server/common-module/src/main/resources/logback-spring.xml
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,29 @@ | ||
<configuration> | ||
<property name="LOG_DIR" value="./logs" /> | ||
<property name="LOG_FILE_NAME" value="serverLog" /> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>[%X{moduleName}] %d{HH:mm:ss.SSS} %highlight(%-5level) %magenta(%-4relative) --- [ %thread{10} ] %cyan(%logger{29}) - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>${LOG_DIR}/${LOG_FILE_NAME}.log</file> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
<fileNamePattern>${LOG_DIR}/${LOG_FILE_NAME}-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern> | ||
<maxFileSize>10MB</maxFileSize> | ||
<maxHistory>30</maxHistory> | ||
</rollingPolicy> | ||
<encoder> | ||
<pattern>[%X{moduleName}] %d{HH:mm:ss.SSS} [ %thread ] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="org.springframework" level="INFO"/> | ||
<logger name="org.hibernate" level="INFO"/> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE"/> | ||
<appender-ref ref="FILE"/> | ||
</root> | ||
</configuration> |
5 changes: 5 additions & 0 deletions
5
back/home_server/discord-module/src/main/java/hhs/server/discord/DiscordApplication.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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
package hhs.server.discord; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.slf4j.MDC; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@Slf4j | ||
@SpringBootApplication | ||
public class DiscordApplication { | ||
public static void main(String[] args) { | ||
MDC.put("moduleName","DISCORD"); | ||
log.info("Starting Discord module"); | ||
SpringApplication.run(DiscordApplication.class, args); | ||
} | ||
} |
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