Skip to content

Commit

Permalink
chore: clean codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Oct 31, 2023
1 parent 62ff318 commit f4d146c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 2 additions & 8 deletions integration/src/main/java/com/example/demo/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@

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.Profile;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.*;
import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import reactor.netty.http.server.HttpServer;

Expand All @@ -24,7 +18,7 @@ public class Application {

public static void main(String[] args) throws Exception {
try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
Application.class)) {
Application.class)) {
context.getBean(HttpServer.class).bindNow().onDispose().block();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public void setup() {

@AfterEach
public void tearDown() {
if (this.disposableServer != null && !this.disposableServer.isDisposed()) {
this.disposableServer.dispose();
}
this.disposableServer.disposeNow();
}

@Test
Expand Down

0 comments on commit f4d146c

Please sign in to comment.