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