Removes breaking and unneeded config annotation
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
8a8a8f15b1
commit
2e4bbbd810
@ -1,14 +1,20 @@
|
|||||||
package net.halfbinary.tmnt.config
|
package net.halfbinary.tmnt.config
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry
|
import org.springframework.web.servlet.config.annotation.CorsRegistry
|
||||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||||
|
|
||||||
@Configuration
|
@Configuration(proxyBeanMethods = false)
|
||||||
@EnableWebMvc
|
class MyCorsConfiguration {
|
||||||
class WebConfig : WebMvcConfigurer {
|
|
||||||
override fun addCorsMappings(registry: CorsRegistry) {
|
@Bean
|
||||||
registry.addMapping("/**")
|
fun corsConfigurer(): WebMvcConfigurer {
|
||||||
|
return object : WebMvcConfigurer {
|
||||||
|
override fun addCorsMappings(registry: CorsRegistry) {
|
||||||
|
registry.addMapping("/**")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user