728x90 [개발] Spring Framework/Spring1 Handling Errors in Spring Webflux (Spring Webflux 에서 예외 처리) 스프링5, 스프링부트2에서 웹플럭스를 사용할 때 에러(예외)를 쉽게 처리할 수 있도록 스프링에서 지원하는 방법을 알아보자. 참고자료 일단 셋팅.. 예외를 처리하는 방법을 알기전에 예외를 발생시킬 수 있는 환경부터 만들어보자. 기본적으로, 라우터와 핸들러가 필요할 것이다. HelloRouter.kt @Configuration class HelloRouter ( private val helloHandler: HelloHandler ) { @Bean fun routeHello(): RouterFunction { return coRouter { "/hello".nest { accept(MediaType.APPLICATION\_JSON).nest { GET("", helloHandler::hello) } } } .. 2020. 9. 6. 이전 1 다음 728x90