File tree Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Expand file tree Collapse file tree 4 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
66import org.springframework.boot.runApplication
77import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
88
9- @EnableWebSecurity
109@SpringBootApplication
1110@EnableConfigurationProperties(ClientProperties ::class )
1211class SpringMiraiClientApplication
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import dto.HttpDto
44import kotlinx.coroutines.GlobalScope
55import kotlinx.coroutines.launch
66import net.lz1998.mirai.service.BotService
7- import net.lz1998.mirai.service.MyLoginSolver
87import org.springframework.beans.factory.annotation.Autowired
98import org.springframework.web.bind.annotation.*
109
Original file line number Diff line number Diff line change 1+ package net.lz1998.mirai.security
2+
3+ import org.springframework.context.annotation.Configuration
4+ import org.springframework.security.config.annotation.web.builders.HttpSecurity
5+ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
6+ import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
7+
8+ @Configuration
9+ @EnableWebSecurity
10+ class SecurityConfig : WebSecurityConfigurerAdapter (){
11+ override fun configure (http : HttpSecurity ? ) {
12+ http!! .cors().and ().csrf().disable()
13+ super .configure(http)
14+ }
15+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments