diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java index c2069b34c1..200b252113 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/NettyWebServerFactoryCustomizerTests.java @@ -50,7 +50,7 @@ public class NettyWebServerFactoryCustomizerTests { } @Test - public void deduceUseForwardHeadersUndertow() { + public void deduceUseForwardHeaders() { this.environment.setProperty("DYNO", "-"); NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class); this.customizer.customize(factory); @@ -58,14 +58,14 @@ public class NettyWebServerFactoryCustomizerTests { } @Test - public void defaultUseForwardHeadersUndertow() { + public void defaultUseForwardHeaders() { NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class); this.customizer.customize(factory); verify(factory).setUseForwardHeaders(false); } @Test - public void setUseForwardHeadersUndertow() { + public void setUseForwardHeaders() { this.serverProperties.setUseForwardHeaders(true); NettyReactiveWebServerFactory factory = mock(NettyReactiveWebServerFactory.class); this.customizer.customize(factory); diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index db868b6380..82411c5f2f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -763,13 +763,13 @@ example: In the preceding example, if the `development` profile is active, the `server.address` property is `127.0.0.1`. Similarly, if the `production` *and* `eu-central` profiles are -active, the `server.address` property is `192.168.1.120`. If the `development` and +active, the `server.address` property is `192.168.1.120`. If the `development`, `production` and `eu-central` profiles are *not* enabled, then the value for the property is `192.168.1.100`. [NOTE] ==== -`spring.profiles` can therefore contains a simple profile name (for example `production`) +`spring.profiles` can therefore contain a simple profile name (for example `production`) or a profile expression. A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`. Check the {spring-reference}core.html#beans-definition-profiles-java[reference guide] for more @@ -1821,7 +1821,7 @@ ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:71 - no applicable action f The `` tag lets you optionally include or exclude sections of configuration based on the active Spring profiles. Profile sections are supported anywhere within the `` element. Use the `name` attribute to specify which -profile accepts the configuration. The ` tag can contains a simple profile +profile accepts the configuration. The `` tag can contain a simple profile name (for example `staging`) or a profile expression. A profile expression allows for more complicated profile logic to be expressed, for example `production & (eu-central | eu-west)`. Check the diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java index 4cd40180c2..526cda5fef 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java @@ -102,6 +102,7 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact /** * Set if x-forward-* headers should be processed. * @param useForwardHeaders if x-forward headers should be used + * @since 2.1.0 */ public void setUseForwardHeaders(boolean useForwardHeaders) { this.useForwardHeaders = useForwardHeaders; diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java index 48a0a5f1c9..c710eb04da 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/SpringBootJoranConfiguratorTests.java @@ -118,7 +118,7 @@ public class SpringBootJoranConfiguratorTests { @Test public void profileExpressionMatchSecond() throws Exception { - this.environment.setActiveProfiles("production"); + this.environment.setActiveProfiles("test"); initialize("profile-expression.xml"); this.logger.trace("Hello"); this.out.expect(containsString("Hello")); diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java index c2b894d2d9..c4a5d92627 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java @@ -180,8 +180,7 @@ public class TomcatServletWebServerFactoryTests TomcatServletWebServerFactory factory = getFactory(); Connector[] listeners = new Connector[4]; for (int i = 0; i < listeners.length; i++) { - Connector connector = new Connector(); - listeners[i] = connector; + listeners[i] = new Connector(); } factory.addAdditionalTomcatConnectors(listeners); this.webServer = factory.getWebServer();