summaryrefslogtreecommitdiff
path: root/sw-server/src
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:18:11 +0200
committerJoffrey Bion <joffrey.bion@gmail.com>2022-07-03 00:20:01 +0200
commit0093aa979109d860f2768d0612c7243afe117c7f (patch)
tree9362435bbe4f8ed5c6d7337b0b3f0710d65c595c /sw-server/src
parentUpgrade coroutines to 1.6.3 (diff)
downloadseven-wonders-0093aa979109d860f2768d0612c7243afe117c7f.tar.gz
seven-wonders-0093aa979109d860f2768d0612c7243afe117c7f.tar.bz2
seven-wonders-0093aa979109d860f2768d0612c7243afe117c7f.zip
Upgrade Spring boot to 2.7.1
Diffstat (limited to 'sw-server/src')
-rw-r--r--sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSecurityConfig.kt10
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt2
2 files changed, 6 insertions, 6 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSecurityConfig.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSecurityConfig.kt
index aa080189..f590c1e7 100644
--- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSecurityConfig.kt
+++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/config/WebSecurityConfig.kt
@@ -1,14 +1,14 @@
package org.luxons.sevenwonders.server.config
+import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.security.config.annotation.web.builders.HttpSecurity
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
+import org.springframework.security.web.SecurityFilterChain
@Configuration
-class WebSecurityConfig : WebSecurityConfigurerAdapter() {
+class WebSecurityConfig {
// this disables default authentication settings
- override fun configure(httpSecurity: HttpSecurity) {
- http.cors().and().csrf().disable()
- }
+ @Bean
+ fun filterChain(http: HttpSecurity): SecurityFilterChain? = http.cors().and().csrf().disable().build()
}
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
index 549ef267..3c96fc25 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
@@ -9,7 +9,7 @@ import org.luxons.sevenwonders.model.api.events.GameListEvent
import org.luxons.sevenwonders.server.test.*
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
-import org.springframework.boot.web.server.LocalServerPort
+import org.springframework.boot.test.web.server.LocalServerPort
import org.springframework.test.context.junit4.SpringRunner
import kotlin.test.Test
import kotlin.test.assertEquals
bgstack15