use of org.springframework.boot.autoconfigure.web.ServerProperties in project spring-cloud-sleuth by spring-cloud.
the class DefaultEndpointLocatorConfigurationTest method negativePortFromServerProperties.
@Test
public void negativePortFromServerProperties() throws UnknownHostException {
ServerProperties properties = new ServerProperties();
properties.setPort(-1);
DefaultEndpointLocator locator = new DefaultEndpointLocator(null, properties, environment, new ZipkinProperties(), localAddress(ADDRESS1234));
assertThat(locator.local().port()).isEqualTo(8080);
}
use of org.springframework.boot.autoconfigure.web.ServerProperties in project spring-boot by spring-projects.
the class JettyWebServerFactoryCustomizerTests method setup.
@BeforeEach
void setup() {
this.environment = new MockEnvironment();
this.serverProperties = new ServerProperties();
ConfigurationPropertySources.attach(this.environment);
this.customizer = new JettyWebServerFactoryCustomizer(this.environment, this.serverProperties);
}
use of org.springframework.boot.autoconfigure.web.ServerProperties in project spring-boot by spring-projects.
the class TomcatWebServerFactoryCustomizerTests method setup.
@BeforeEach
void setup() {
this.environment = new MockEnvironment();
this.serverProperties = new ServerProperties();
ConfigurationPropertySources.attach(this.environment);
this.customizer = new TomcatWebServerFactoryCustomizer(this.environment, this.serverProperties);
}
use of org.springframework.boot.autoconfigure.web.ServerProperties in project spring-boot by spring-projects.
the class UndertowServletWebServerFactoryCustomizerTests method eagerFilterInitCanBeDisabled.
@Test
void eagerFilterInitCanBeDisabled() {
UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory(0);
assertThat(factory.isEagerFilterInit()).isTrue();
ServerProperties serverProperties = new ServerProperties();
serverProperties.getUndertow().setEagerFilterInit(false);
new UndertowServletWebServerFactoryCustomizer(serverProperties).customize(factory);
assertThat(factory.isEagerFilterInit()).isFalse();
}
use of org.springframework.boot.autoconfigure.web.ServerProperties in project spring-boot by spring-projects.
the class UndertowWebServerFactoryCustomizerTests method setup.
@BeforeEach
void setup() {
this.environment = new MockEnvironment();
this.serverProperties = new ServerProperties();
ConfigurationPropertySources.attach(this.environment);
this.customizer = new UndertowWebServerFactoryCustomizer(this.environment, this.serverProperties);
}
Aggregations