Spring Security 적용
Spring 최신 버전으로 롤백
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.4.2'
|
||||
id 'org.springframework.boot' version '2.6.6'
|
||||
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
||||
}
|
||||
|
||||
@@ -25,4 +25,8 @@ allprojects {
|
||||
jar {
|
||||
enabled(false)
|
||||
}
|
||||
|
||||
ext {
|
||||
set('springCloudVersion', "2021.0.1")
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":util"))
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-server'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.roy.springcloud.gateway;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
||||
import org.springframework.security.web.server.SecurityWebFilterChain;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GatewayApplication {
|
||||
@@ -10,4 +13,9 @@ public class GatewayApplication {
|
||||
SpringApplication.run(GatewayApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity security) {
|
||||
return security.csrf().disable().build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":util"))
|
||||
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
ext {
|
||||
set('springCloudVersion', "2020.0.5")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":util"))
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
import static com.roy.springcloud.util.mapper.MapperUtil.toObject;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/")
|
||||
@RequestMapping("")
|
||||
@RequiredArgsConstructor
|
||||
public class UserController {
|
||||
private final Environment environment;
|
||||
|
||||
Reference in New Issue
Block a user