[ADD] webflux추가

main
bjkim 10 months ago
parent a9090e4a22
commit 4c91e89470

@ -43,7 +43,9 @@ dependencies {
// MariaDB 드라이버 // MariaDB 드라이버
runtimeOnly("org.mariadb.jdbc:mariadb-java-client:3.1.4") runtimeOnly("org.mariadb.jdbc:mariadb-java-client:3.1.4")
// Lombok (선택) implementation("org.springframework.boot:spring-boot-starter-webflux")
//
compileOnly("org.projectlombok:lombok:1.18.38") compileOnly("org.projectlombok:lombok:1.18.38")
annotationProcessor("org.projectlombok:lombok:1.18.38") annotationProcessor("org.projectlombok:lombok:1.18.38")
testCompileOnly("org.projectlombok:lombok:1.18.38") testCompileOnly("org.projectlombok:lombok:1.18.38")
@ -52,6 +54,7 @@ dependencies {
// 테스트 // 테스트
testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test") testImplementation("org.springframework.security:spring-security-test")
} }
// Java 컴파일 인코딩 및 파라미터 리플렉션 지원 // Java 컴파일 인코딩 및 파라미터 리플렉션 지원

@ -0,0 +1,34 @@
package kr.re.etri.autoflow.common;
import io.netty.handler.ssl.SslContextBuilder;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.netty.http.client.HttpClient;
import javax.net.ssl.SSLException;
@Configuration
public class WebClientConfig {
@Bean
public WebClient webClient(WebClient.Builder builder) throws Exception {
HttpClient httpClient = HttpClient.create()
.secure(ssl -> {
try {
ssl.sslContext(
SslContextBuilder.forClient()
.trustManager(InsecureTrustManagerFactory.INSTANCE).build() // SSL 검증 무시
);
} catch (SSLException e) {
throw new RuntimeException(e);
}
});
return builder
.clientConnector(new ReactorClientHttpConnector(httpClient))
.build();
}
}
Loading…
Cancel
Save