소스 검색

HelloWebfluxApplicationTests do not start a server

Rob Winch 8 년 전
부모
커밋
a34bf01754
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      samples/javaconfig/hellowebflux/src/main/java/sample/HelloWebfluxApplication.java

+ 2 - 4
samples/javaconfig/hellowebflux/src/main/java/sample/HelloWebfluxApplication.java

@@ -18,10 +18,7 @@ package sample;
 
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.*;
 import org.springframework.http.server.reactive.HttpHandler;
 import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
 import org.springframework.web.reactive.DispatcherHandler;
@@ -46,6 +43,7 @@ public class HelloWebfluxApplication {
 		}
 	}
 
+	@Profile("default")
 	@Bean
 	public NettyContext nettyContext(ApplicationContext context) {
 		HttpHandler handler = DispatcherHandler.toHttpHandler(context);