Skip to content

Commit 3d0219c

Browse files
committed
Merge branch '2.1.x'
2 parents 1893eee + 28175c8 commit 3d0219c

File tree

35 files changed

+73
-89
lines changed

35 files changed

+73
-89
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementPortType.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public enum ManagementPortType {
4545
* Look at the given environment to determine if the {@link ManagementPortType} is
4646
* {@link #DISABLED}, {@link #SAME} or {@link #DIFFERENT}.
4747
* @param environment the Spring environment
48-
* @return {@link #DISABLED} if `management.server.port` is set to a negative value,
49-
* {@link #SAME} if `management.server.port` is not specified or equal to
50-
* `server.port`and {@link #DIFFERENT} otherwise.
48+
* @return {@link #DISABLED} if {@code management.server.port} is set to a negative
49+
* value, {@link #SAME} if {@code management.server.port} is not specified or equal to
50+
* {@code server.port} and {@link #DIFFERENT} otherwise.
5151
* @since 2.1.4
5252
*/
5353
public static ManagementPortType get(Environment environment) {

Diff for: spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ shown in the following example:
11801180
}
11811181
----
11821182

1183-
JAXB is only available out of the box with Java 8. If you're using a more recent java
1183+
JAXB is only available out of the box with Java 8. If you're using a more recent Java
11841184
generation, add the following dependency to your project:
11851185

11861186
[source,xml,indent=0,subs="verbatim,quotes,attributes"]

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-main-attach-disabled/verify.groovy

+2-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import static org.junit.Assert.assertTrue
44
import static org.junit.Assert.assertFalse
55

66
File repackaged = new File(basedir, "target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar")
7-
File main = new File( basedir, "target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar")
8-
File backup = new File( basedir, "target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar.original")
7+
File main = new File(basedir, "target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar")
8+
File backup = new File(basedir, "target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar.original")
99

1010
new Verify.JarArchiveVerification(repackaged, Verify.SAMPLE_APP).verify();
1111
assertTrue 'main artifact should exist', main.exists()
@@ -22,6 +22,3 @@ assertFalse 'repackaged artifact should not have been installed',
2222
file.text.contains ("Installing " + repackaged + " to")
2323
assertFalse 'backup artifact should not have been installed',
2424
file.text.contains ("Installing " + backup + "to")
25-
26-
27-

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-main/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import static org.junit.Assert.assertTrue
44
import static org.junit.Assert.assertFalse
55

66
File repackaged = new File(basedir, "target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT-test.jar")
7-
File main = new File( basedir, "target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar")
8-
File backup = new File( basedir, "target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar.original")
7+
File main = new File(basedir, "target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar")
8+
File backup = new File(basedir, "target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar.original")
99

1010
new Verify.JarArchiveVerification(repackaged, Verify.SAMPLE_APP).verify();
1111
assertTrue 'main artifact should exist', main.exists()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-source-attach-disabled/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import org.springframework.boot.maven.*
33
import static org.junit.Assert.assertTrue
44
import static org.junit.Assert.assertFalse
55

6-
File main = new File(basedir, "target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar");
7-
File backup = new File( basedir, "target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar.original")
6+
File main = new File(basedir, "target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar")
7+
File backup = new File(basedir, "target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar.original")
88

99
new Verify.JarArchiveVerification(main, Verify.SAMPLE_APP).verify();
1010
assertTrue 'backup artifact should exist', backup.exists()
@@ -18,4 +18,3 @@ assertTrue 'backup artifact should have been installed',
1818
file.text.contains ("Installing " + backup + " to")
1919
assertFalse 'repackaged artifact should not have been installed',
2020
file.text.contains ("Installing " + main + " to")
21-

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-source/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import org.springframework.boot.maven.*
33
import static org.junit.Assert.assertFalse
44
import static org.junit.Assert.assertTrue
55

6-
File repackaged = new File(basedir, "target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar");
7-
File backup = new File( basedir, "target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar.original")
6+
File repackaged = new File(basedir, "target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar")
7+
File backup = new File(basedir, "target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar.original")
88

99
new Verify.JarArchiveVerification(repackaged, Verify.SAMPLE_APP).verify();
1010
assertTrue 'backup artifact should exist', backup.exists()
@@ -14,4 +14,3 @@ assertTrue 'repackaged artifact should have been replaced',
1414
file.text.contains("Replacing artifact with classifier test with repackaged archive")
1515
assertFalse 'backup artifact should not have been installed', file.text.contains ("Installing "+backup)
1616
assertTrue 'repackaged artifact should have been installed', file.text.contains ("Installing "+repackaged)
17-

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-create-dir/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyJar(
5-
new File( basedir, "target/foo/jar-create-dir-0.0.1.BUILD-SNAPSHOT-foo.jar" ), "some.random.Main"
6-
);
7-
5+
new File(basedir, "target/foo/jar-create-dir-0.0.1.BUILD-SNAPSHOT-foo.jar"), "some.random.Main"
6+
)

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-custom-dir/verify.groovy

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyJar(
5-
new File( basedir, "target/foo/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar" ), "some.random.Main"
6-
);
5+
new File(basedir, "target/foo/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar"), "some.random.Main"
6+
)
77

88
Verify.verifyJar(
9-
new File( localRepositoryPath, "org/springframework/boot/maven/it/jar-custom-dir/0.0.1.BUILD-SNAPSHOT/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar" ), "some.random.Main"
10-
);
11-
12-
13-
14-
9+
new File(localRepositoryPath, "org/springframework/boot/maven/it/jar-custom-dir/0.0.1.BUILD-SNAPSHOT/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar"), "some.random.Main"
10+
)

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-custom-launcher/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyJar(
5-
new File( basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar" ), "some.random.Main", "Hello world"
6-
);
7-
5+
new File(basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar"), "some.random.Main", "Hello world"
6+
)
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import java.io.*;
22
import org.springframework.boot.maven.*;
33

4-
File f = new File( basedir, "target/jar-exclude-artifact-0.0.1.BUILD-SNAPSHOT.jar");
4+
File f = new File(basedir, "target/jar-exclude-artifact-0.0.1.BUILD-SNAPSHOT.jar")
55
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
66
@Override
77
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
88
super.verifyZipEntries(verifier)
99
verifier.assertHasNoEntryNameStartingWith("lib/servlet-api-2.5.jar")
1010
}
11-
}.verify();
11+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-exclude-entry/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-exclude-entry-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-exclude-entry-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasNoEntryNameStartingWith("lib/servlet-api-2.5.jar")
2626
}
27-
}.verify();
27+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-exclude-group/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-exclude-group-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-exclude-group-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasNoEntryNameStartingWith("lib/log4j-api-2.4.1.jar")
2626
}
27-
}.verify();
27+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-executable/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyJar(
5-
new File( basedir, "target/jar-executable-0.0.1.BUILD-SNAPSHOT.jar" ),
5+
new File(basedir, "target/jar-executable-0.0.1.BUILD-SNAPSHOT.jar"),
66
"some.random.Main", "Spring Boot Startup Script", "MyFullyExecutableJarName",
7-
"MyFullyExecutableJarDesc");
8-
7+
"MyFullyExecutableJarDesc")

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-non-executable/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyJar(
5-
new File( basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar" ), "some.random.Main", false
6-
);
7-
5+
new File(basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar"), "some.random.Main", false
6+
)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import static org.junit.Assert.assertTrue
22
import static org.junit.Assert.assertFalse
33

4-
File f = new File( basedir, "target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar")
4+
File f = new File(basedir, "target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar")
55
assertTrue 'output file should have been generated', f.exists()
6-
File shouldNotExist = new File( basedir, "target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar.original")
6+
File shouldNotExist = new File(basedir, "target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar.original")
77
assertFalse 'repackage goal should not have run. .original should not exist', shouldNotExist.exists()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-system-scope-default/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-system-scope-default-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-system-scope-default-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasNoEntryNameStartingWith("BOOT-INF/lib/sample-1.0.0.jar")
2626
}
27-
}.verify();
27+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-system-scope/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-system-scope-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-system-scope-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasEntryNameStartingWith("BOOT-INF/lib/sample-1.0.0.jar")
2626
}
27-
}.verify();
27+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-test-scope/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-test-scope-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-test-scope-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasNoEntryNameStartingWith("lib/log4j-api-2.4.1.jar")
2626
}
27-
}.verify();
27+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-with-kotlin-module/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-with-kotlin-module-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-with-kotlin-module-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
@@ -27,4 +27,4 @@ new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2727
verifier.assertHasNonUnpackEntry("BOOT-INF/lib/kotlin-stdlib-")
2828
verifier.assertHasNonUnpackEntry("BOOT-INF/lib/kotlin-reflect-")
2929
}
30-
}.verify();
30+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-with-unpack/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/jar-with-unpack-0.0.1.BUILD-SNAPSHOT.jar");
20+
File f = new File(basedir, "target/jar-with-unpack-0.0.1.BUILD-SNAPSHOT.jar")
2121
new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {
2424
super.verifyZipEntries(verifier)
2525
verifier.assertHasUnpackEntry("BOOT-INF/lib/spring-core-")
2626
verifier.assertHasNonUnpackEntry("BOOT-INF/lib/spring-context-")
2727
}
28-
}.verify();
28+
}.verify()

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/prop/verify.groovy

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyZip(
5-
new File( basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar" )
6-
);
7-
5+
new File(basedir, "target/jar-0.0.1.BUILD-SNAPSHOT.jar")
6+
)

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-reactor/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "war/target/war-0.0.1.BUILD-SNAPSHOT.war")
20+
File f = new File(basedir, "war/target/war-0.0.1.BUILD-SNAPSHOT.war")
2121
new Verify.WarArchiveVerification(f) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-with-unpack/verify.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.io.*;
1818
import org.springframework.boot.maven.*;
1919

20-
File f = new File( basedir, "target/war-0.0.1.BUILD-SNAPSHOT.war")
20+
File f = new File(basedir, "target/war-0.0.1.BUILD-SNAPSHOT.war")
2121
new Verify.WarArchiveVerification(f) {
2222
@Override
2323
protected void verifyZipEntries(Verify.ArchiveVerifier verifier) throws Exception {

Diff for: spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war/verify.groovy

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import java.io.*;
22
import org.springframework.boot.maven.*;
33

44
Verify.verifyWar(
5-
new File( basedir, "target/war-0.0.1.BUILD-SNAPSHOT.war" )
6-
);
5+
new File(basedir, "target/war-0.0.1.BUILD-SNAPSHOT.war")
6+
)
77

Diff for: spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import javax.annotation.PostConstruct;
2929

30-
import org.assertj.core.api.Assertions;
3130
import org.assertj.core.api.Condition;
3231
import org.junit.After;
3332
import org.junit.Before;
@@ -1080,7 +1079,7 @@ public void webApplicationSwitchedOffInListener() {
10801079
ExampleConfig.class);
10811080
application.addListeners(
10821081
(ApplicationListener<ApplicationEnvironmentPreparedEvent>) (event) -> {
1083-
Assertions.assertThat(event.getEnvironment())
1082+
assertThat(event.getEnvironment())
10841083
.isInstanceOf(StandardServletEnvironment.class);
10851084
TestPropertySourceUtils.addInlinedPropertiesToEnvironment(
10861085
event.getEnvironment(), "foo=bar");

Diff for: spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
public class ManagementPortAndPathSampleActuatorApplicationTests {
4444

4545
@LocalServerPort
46-
private int port = 9010;
46+
private int port;
4747

4848
@LocalManagementPort
49-
private int managementPort = 9011;
49+
private int managementPort;
5050

5151
@Test
5252
public void testHome() {

Diff for: spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2018 the original author or authors.
2+
* Copyright 2012-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
import org.apache.logging.log4j.LogManager;
2222
import org.apache.logging.log4j.Logger;
23-
import org.assertj.core.api.Assertions;
2423
import org.junit.Rule;
2524
import org.junit.Test;
2625
import org.junit.runner.RunWith;
@@ -32,6 +31,7 @@
3231
import org.springframework.test.context.junit4.SpringRunner;
3332
import org.springframework.test.web.servlet.MockMvc;
3433

34+
import static org.assertj.core.api.Assertions.assertThat;
3535
import static org.hamcrest.Matchers.equalTo;
3636
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
3737
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
@@ -60,7 +60,7 @@ public class SampleActuatorLog4J2ApplicationTests {
6060
@Test
6161
public void testLogger() {
6262
logger.info("Hello World");
63-
Assertions.assertThat(this.output.toString()).contains("Hello World");
63+
assertThat(this.output.toString()).contains("Hello World");
6464
}
6565

6666
@Test

Diff for: spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
public class SampleActuatorUiApplicationPortTests {
4444

4545
@LocalServerPort
46-
private int port = 9010;
46+
private int port;
4747

4848
@LocalManagementPort
49-
private int managementPort = 9011;
49+
private int managementPort;
5050

5151
@Test
5252
public void testHome() {

Diff for: spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
public class ManagementAddressActuatorApplicationTests {
4545

4646
@LocalServerPort
47-
private int port = 9010;
47+
private int port;
4848

4949
@LocalManagementPort
50-
private int managementPort = 9011;
50+
private int managementPort;
5151

5252
@Test
5353
public void testHome() {

Diff for: spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
public class ManagementPortAndPathSampleActuatorApplicationTests {
4747

4848
@LocalServerPort
49-
private int port = 9010;
49+
private int port;
5050

5151
@LocalManagementPort
52-
private int managementPort = 9011;
52+
private int managementPort;
5353

5454
@Autowired
5555
private Environment environment;

0 commit comments

Comments
 (0)