-
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.
♻️ batch server에서 로그 받도록 socket-server 설정
- Loading branch information
1 parent
baf5130
commit 8c77aa5
Showing
5 changed files
with
31 additions
and
6 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
9 changes: 8 additions & 1 deletion
9
scheduler/src/main/kotlin/backend/team/ahachul_backend/ScheduleModuleApplication.kt
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,18 @@ | ||
package backend.team.ahachul_backend | ||
|
||
import backend.team.ahachul_backend.common.properties.SocketServerProperties | ||
import ch.qos.logback.classic.net.SimpleSocketServer | ||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.boot.context.properties.EnableConfigurationProperties | ||
import org.springframework.boot.runApplication | ||
import org.springframework.context.ApplicationContext | ||
|
||
@SpringBootApplication | ||
@EnableConfigurationProperties | ||
class ScheduleModuleApplication | ||
|
||
fun main(args: Array<String>) { | ||
runApplication<ScheduleModuleApplication>(*args) | ||
val context: ApplicationContext = runApplication<ScheduleModuleApplication>(*args) | ||
val properties = context.getBean(SocketServerProperties::class.java) | ||
SimpleSocketServer.main(arrayOf(properties.port, properties.configPath)) | ||
} |
11 changes: 11 additions & 0 deletions
11
.../src/main/kotlin/backend/team/ahachul_backend/common/properties/SocketServerProperties.kt
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,11 @@ | ||
package backend.team.ahachul_backend.common.properties | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
@ConfigurationProperties(prefix = "socket-server") | ||
data class SocketServerProperties( | ||
var port: String = "", | ||
var configPath: String = "" | ||
) |
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