Skip to content

Commit

Permalink
style: ktlint로 code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
unanchoi committed Apr 11, 2024
1 parent 6ebdcdc commit 1e0fff6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import org.springframework.boot.runApplication
class KatchupserverApplication

fun main(args: Array<String>) {
runApplication<KatchupserverApplication>(*args)
runApplication<KatchupserverApplication>(*args)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ package site.katchup.springboot.config
import org.slf4j.Logger
import org.slf4j.LoggerFactory

inline fun <reified T> T.getLogger(): Logger = LoggerFactory.getLogger(T::class.java)!!
inline fun <reified T> T.getLogger(): Logger = LoggerFactory.getLogger(T::class.java)!!
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package site.katchup.springboot.config

import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Configuration
import org.springframework.messaging.simp.config.MessageBrokerRegistry
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker
Expand All @@ -13,12 +12,12 @@ class WebSocketConfig : WebSocketMessageBrokerConfigurer {

override fun registerStompEndpoints(registry: StompEndpointRegistry) {
registry.addEndpoint("/ws")
.setAllowedOrigins("*")
.withSockJS()
.setAllowedOrigins("*")
.withSockJS()
}

override fun configureMessageBroker(registry: MessageBrokerRegistry) {
registry.setApplicationDestinationPrefixes("/sub")
registry.enableSimpleBroker("/pub")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.springframework.messaging.simp.SimpMessageSendingOperations
import org.springframework.stereotype.Controller
import site.katchup.springboot.dto.ChatMessage


@Controller
class WebSocketTestController(
private val simpMessageSendingOperations: SimpMessageSendingOperations
Expand All @@ -14,4 +13,4 @@ class WebSocketTestController(
fun handle(message: ChatMessage) {
simpMessageSendingOperations.convertAndSend("/sub/channel" + message.channelId, message.data)
}
}
}
3 changes: 1 addition & 2 deletions src/main/kotlin/site/katchup/springboot/dto/ChatMessage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ class ChatMessage(
val sender: String,
val channelId: String,
val data: Any
) {
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest
class KatchupserverApplicationTests {

@Test
fun contextLoads() {
}

@Test
fun contextLoads() {
}
}

0 comments on commit 1e0fff6

Please sign in to comment.