Introduce default constructor in TomcatHttpServer
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.http.server.reactive;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
@@ -125,11 +124,10 @@ public abstract class AbstractHttpHandlerIntegrationTests {
|
||||
}
|
||||
|
||||
static Stream<HttpServer> httpServers() {
|
||||
File base = new File(System.getProperty("java.io.tmpdir"));
|
||||
return Stream.of(
|
||||
new JettyHttpServer(),
|
||||
new ReactorHttpServer(),
|
||||
new TomcatHttpServer(base.getAbsolutePath()),
|
||||
new TomcatHttpServer(),
|
||||
new UndertowHttpServer()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,15 @@ public class TomcatHttpServer extends AbstractHttpServer {
|
||||
private Tomcat tomcatServer;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new Tomcat HTTP server using the {@code java.io.tmpdir} JVM
|
||||
* system property as the {@code baseDir}.
|
||||
* @since 5.2
|
||||
*/
|
||||
public TomcatHttpServer() {
|
||||
this(new File(System.getProperty("java.io.tmpdir")).getAbsolutePath());
|
||||
}
|
||||
|
||||
public TomcatHttpServer(String baseDir) {
|
||||
this(baseDir, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user