summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/TopicSubscriptionInterceptor.kt2
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSocketConfig.kt5
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt2
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt2
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/HomeController.kt2
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepository.kt2
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/validation/DestinationAccessValidator.kt2
7 files changed, 9 insertions, 8 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/TopicSubscriptionInterceptor.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/TopicSubscriptionInterceptor.kt
index 5342503b..5f298633 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/TopicSubscriptionInterceptor.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/TopicSubscriptionInterceptor.kt
@@ -11,7 +11,7 @@ import org.springframework.messaging.support.ChannelInterceptor
import org.springframework.stereotype.Component
@Component
-class TopicSubscriptionInterceptor @Autowired constructor(
+class TopicSubscriptionInterceptor(
private val destinationAccessValidator: DestinationAccessValidator
) : ChannelInterceptor {
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSocketConfig.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSocketConfig.kt
index f68cddef..21eb7cc8 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSocketConfig.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSocketConfig.kt
@@ -13,8 +13,9 @@ import org.springframework.web.socket.server.support.DefaultHandshakeHandler
@Configuration
@EnableWebSocketMessageBroker
-class WebSocketConfig @Autowired constructor(private val topicSubscriptionInterceptor: TopicSubscriptionInterceptor) :
- WebSocketMessageBrokerConfigurer {
+class WebSocketConfig(
+ private val topicSubscriptionInterceptor: TopicSubscriptionInterceptor
+) : WebSocketMessageBrokerConfigurer {
override fun configureMessageBroker(config: MessageBrokerRegistry) {
// prefixes for all subscriptions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
index 3fa2ac87..48928632 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserController.kt
@@ -24,7 +24,7 @@ import java.security.Principal
*/
@Api(name = "GameBrowser")
@Controller
-class GameBrowserController @Autowired constructor(
+class GameBrowserController(
private val lobbyController: LobbyController,
private val lobbyRepository: LobbyRepository,
private val playerRepository: PlayerRepository,
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
index be5d916b..2a253136 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt
@@ -22,7 +22,7 @@ import java.security.Principal
*/
@Api(name = "Game")
@Controller
-class GameController @Autowired constructor(
+class GameController(
private val template: SimpMessagingTemplate,
private val playerRepository: PlayerRepository
) {
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/HomeController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/HomeController.kt
index ff668fd9..cfc6b58f 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/HomeController.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/HomeController.kt
@@ -18,7 +18,7 @@ import java.security.Principal
*/
@Api(name = "Home")
@Controller
-class HomeController @Autowired constructor(
+class HomeController(
private val playerRepository: PlayerRepository
) {
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepository.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepository.kt
index 5036266d..6c69b6d5 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepository.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/repositories/LobbyRepository.kt
@@ -9,7 +9,7 @@ import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.atomic.AtomicLong
@Repository
-class LobbyRepository @Autowired constructor() {
+class LobbyRepository {
private val lobbies = ConcurrentHashMap<Long, Lobby>()
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/validation/DestinationAccessValidator.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/validation/DestinationAccessValidator.kt
index 04daf311..4f6b6a6d 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/validation/DestinationAccessValidator.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/validation/DestinationAccessValidator.kt
@@ -6,7 +6,7 @@ import org.springframework.stereotype.Component
import java.util.regex.Pattern
@Component
-class DestinationAccessValidator @Autowired constructor(private val lobbyRepository: LobbyRepository) {
+class DestinationAccessValidator(private val lobbyRepository: LobbyRepository) {
fun hasAccess(username: String?, destination: String): Boolean {
return when {
bgstack15