Skip to content

Commit

Permalink
chore-改进一些代码写法
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Dec 7, 2024
1 parent 83449fa commit 4ac0396
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/test/java/net/ximatai/muyun/gateway/TestUpstream.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,11 @@ public TestUpstream() {
CompletableFuture<Boolean> completableFuture = new CompletableFuture<>();
Router router = Router.router(vertx);

router.get("/").handler(routingContext -> {
routingContext.response().setStatusCode(200).end("Hello, World!");
});
router.get("/").handler(routingContext -> routingContext.response().setStatusCode(200).end("Hello, World!"));

router.get("/test1").handler(routingContext -> {
routingContext.response().setStatusCode(200).end("Hello, World! TEST1!");
});
router.get("/test1").handler(routingContext -> routingContext.response().setStatusCode(200).end("Hello, World! TEST1!"));

router.get("/test2").handler(routingContext -> {
routingContext.response().setStatusCode(200).end("Hello, World! TEST2!");
});
router.get("/test2").handler(routingContext -> routingContext.response().setStatusCode(200).end("Hello, World! TEST2!"));

vertx.createHttpServer()
.requestHandler(router)
Expand Down

0 comments on commit 4ac0396

Please sign in to comment.