Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
3d0219c3
Commit
3d0219c3
authored
Mar 16, 2019
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
parents
1893eeef
28175c86
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
73 additions
and
89 deletions
+73
-89
ManagementPortType.java
.../actuate/autoconfigure/web/server/ManagementPortType.java
+3
-3
howto.adoc
...oot-project/spring-boot-docs/src/main/asciidoc/howto.adoc
+1
-1
verify.groovy
.../src/it/jar-classifier-main-attach-disabled/verify.groovy
+2
-5
verify.groovy
...oot-maven-plugin/src/it/jar-classifier-main/verify.groovy
+2
-2
verify.groovy
...rc/it/jar-classifier-source-attach-disabled/verify.groovy
+2
-3
verify.groovy
...t-maven-plugin/src/it/jar-classifier-source/verify.groovy
+2
-3
verify.groovy
...ing-boot-maven-plugin/src/it/jar-create-dir/verify.groovy
+2
-3
verify.groovy
...ing-boot-maven-plugin/src/it/jar-custom-dir/verify.groovy
+4
-8
verify.groovy
...oot-maven-plugin/src/it/jar-custom-launcher/verify.groovy
+2
-3
verify.groovy
...ot-maven-plugin/src/it/jar-exclude-artifact/verify.groovy
+2
-2
verify.groovy
...-boot-maven-plugin/src/it/jar-exclude-entry/verify.groovy
+2
-2
verify.groovy
...-boot-maven-plugin/src/it/jar-exclude-group/verify.groovy
+2
-2
verify.groovy
...ing-boot-maven-plugin/src/it/jar-executable/verify.groovy
+2
-3
verify.groovy
...boot-maven-plugin/src/it/jar-non-executable/verify.groovy
+2
-3
verify.groovy
...ls/spring-boot-maven-plugin/src/it/jar-skip/verify.groovy
+2
-2
verify.groovy
...aven-plugin/src/it/jar-system-scope-default/verify.groovy
+2
-2
verify.groovy
...g-boot-maven-plugin/src/it/jar-system-scope/verify.groovy
+2
-2
verify.groovy
...ing-boot-maven-plugin/src/it/jar-test-scope/verify.groovy
+2
-2
verify.groovy
...-maven-plugin/src/it/jar-with-kotlin-module/verify.groovy
+2
-2
verify.groovy
...ng-boot-maven-plugin/src/it/jar-with-unpack/verify.groovy
+2
-2
verify.groovy
...-tools/spring-boot-maven-plugin/src/it/prop/verify.groovy
+2
-3
verify.groovy
...spring-boot-maven-plugin/src/it/war-reactor/verify.groovy
+1
-1
verify.groovy
...ng-boot-maven-plugin/src/it/war-with-unpack/verify.groovy
+1
-1
verify.groovy
...t-tools/spring-boot-maven-plugin/src/it/war/verify.groovy
+2
-2
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+1
-2
ManagementPortAndPathSampleActuatorApplicationTests.java
.../ManagementPortAndPathSampleActuatorApplicationTests.java
+2
-2
SampleActuatorLog4J2ApplicationTests.java
...actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java
+3
-3
SampleActuatorUiApplicationPortTests.java
...ple/actuator/ui/SampleActuatorUiApplicationPortTests.java
+2
-2
ManagementAddressActuatorApplicationTests.java
...e/actuator/ManagementAddressActuatorApplicationTests.java
+2
-2
ManagementPortAndPathSampleActuatorApplicationTests.java
.../ManagementPortAndPathSampleActuatorApplicationTests.java
+2
-2
ManagementPortSampleActuatorApplicationTests.java
...ctuator/ManagementPortSampleActuatorApplicationTests.java
+2
-2
verify.groovy
...ing-boot-sample-custom-layout/src/it/custom/verify.groovy
+2
-3
verify.groovy
...ng-boot-sample-custom-layout/src/it/default/verify.groovy
+2
-3
JerseyApplicationPathAndManagementPortTests.java
...e/jersey/JerseyApplicationPathAndManagementPortTests.java
+2
-2
ManagementPortSampleSecureWebFluxTests.java
...ecure/webflux/ManagementPortSampleSecureWebFluxTests.java
+5
-4
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementPortType.java
View file @
3d0219c3
...
...
@@ -45,9 +45,9 @@ public enum ManagementPortType {
* Look at the given environment to determine if the {@link ManagementPortType} is
* {@link #DISABLED}, {@link #SAME} or {@link #DIFFERENT}.
* @param environment the Spring environment
* @return {@link #DISABLED} if
`management.server.port` is set to a negative value,
*
{@link #SAME} if `management.server.port`
is not specified or equal to
*
`server.port`
and {@link #DIFFERENT} otherwise.
* @return {@link #DISABLED} if
{@code management.server.port} is set to a negative
*
value, {@link #SAME} if {@code management.server.port}
is not specified or equal to
*
{@code server.port}
and {@link #DIFFERENT} otherwise.
* @since 2.1.4
*/
public
static
ManagementPortType
get
(
Environment
environment
)
{
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
3d0219c3
...
...
@@ -1180,7 +1180,7 @@ shown in the following example:
}
----
JAXB is only available out of the box with Java 8. If you're using a more recent
j
ava
JAXB is only available out of the box with Java 8. If you're using a more recent
J
ava
generation, add the following dependency to your project:
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
...
...
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-main-attach-disabled/verify.groovy
View file @
3d0219c3
...
...
@@ -4,8 +4,8 @@ import static org.junit.Assert.assertTrue
import
static
org
.
junit
.
Assert
.
assertFalse
File
repackaged
=
new
File
(
basedir
,
"target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar"
)
File
main
=
new
File
(
basedir
,
"target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar.original"
)
File
main
=
new
File
(
basedir
,
"target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-main-attach-disabled-0.0.1.BUILD-SNAPSHOT.jar.original"
)
new
Verify
.
JarArchiveVerification
(
repackaged
,
Verify
.
SAMPLE_APP
).
verify
();
assertTrue
'main artifact should exist'
,
main
.
exists
()
...
...
@@ -22,6 +22,3 @@ assertFalse 'repackaged artifact should not have been installed',
file
.
text
.
contains
(
"Installing "
+
repackaged
+
" to"
)
assertFalse
'backup artifact should not have been installed'
,
file
.
text
.
contains
(
"Installing "
+
backup
+
"to"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-main/verify.groovy
View file @
3d0219c3
...
...
@@ -4,8 +4,8 @@ import static org.junit.Assert.assertTrue
import
static
org
.
junit
.
Assert
.
assertFalse
File
repackaged
=
new
File
(
basedir
,
"target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT-test.jar"
)
File
main
=
new
File
(
basedir
,
"target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar.original"
)
File
main
=
new
File
(
basedir
,
"target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-main-0.0.1.BUILD-SNAPSHOT.jar.original"
)
new
Verify
.
JarArchiveVerification
(
repackaged
,
Verify
.
SAMPLE_APP
).
verify
();
assertTrue
'main artifact should exist'
,
main
.
exists
()
...
...
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-source-attach-disabled/verify.groovy
View file @
3d0219c3
...
...
@@ -3,8 +3,8 @@ import org.springframework.boot.maven.*
import
static
org
.
junit
.
Assert
.
assertTrue
import
static
org
.
junit
.
Assert
.
assertFalse
File
main
=
new
File
(
basedir
,
"target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar"
)
;
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar.original"
)
File
main
=
new
File
(
basedir
,
"target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-source-attach-disabled-0.0.1.BUILD-SNAPSHOT-test.jar.original"
)
new
Verify
.
JarArchiveVerification
(
main
,
Verify
.
SAMPLE_APP
).
verify
();
assertTrue
'backup artifact should exist'
,
backup
.
exists
()
...
...
@@ -18,4 +18,3 @@ assertTrue 'backup artifact should have been installed',
file
.
text
.
contains
(
"Installing "
+
backup
+
" to"
)
assertFalse
'repackaged artifact should not have been installed'
,
file
.
text
.
contains
(
"Installing "
+
main
+
" to"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-classifier-source/verify.groovy
View file @
3d0219c3
...
...
@@ -3,8 +3,8 @@ import org.springframework.boot.maven.*
import
static
org
.
junit
.
Assert
.
assertFalse
import
static
org
.
junit
.
Assert
.
assertTrue
File
repackaged
=
new
File
(
basedir
,
"target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar"
)
;
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar.original"
)
File
repackaged
=
new
File
(
basedir
,
"target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar"
)
File
backup
=
new
File
(
basedir
,
"target/jar-classifier-source-0.0.1.BUILD-SNAPSHOT-test.jar.original"
)
new
Verify
.
JarArchiveVerification
(
repackaged
,
Verify
.
SAMPLE_APP
).
verify
();
assertTrue
'backup artifact should exist'
,
backup
.
exists
()
...
...
@@ -14,4 +14,3 @@ assertTrue 'repackaged artifact should have been replaced',
file
.
text
.
contains
(
"Replacing artifact with classifier test with repackaged archive"
)
assertFalse
'backup artifact should not have been installed'
,
file
.
text
.
contains
(
"Installing "
+
backup
)
assertTrue
'repackaged artifact should have been installed'
,
file
.
text
.
contains
(
"Installing "
+
repackaged
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-create-dir/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyJar
(
new
File
(
basedir
,
"target/foo/jar-create-dir-0.0.1.BUILD-SNAPSHOT-foo.jar"
),
"some.random.Main"
);
new
File
(
basedir
,
"target/foo/jar-create-dir-0.0.1.BUILD-SNAPSHOT-foo.jar"
),
"some.random.Main"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-custom-dir/verify.groovy
View file @
3d0219c3
...
...
@@ -2,13 +2,9 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyJar
(
new
File
(
basedir
,
"target/foo/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
)
;
new
File
(
basedir
,
"target/foo/jar-custom-dir-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
)
Verify
.
verifyJar
(
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"
);
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"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-custom-launcher/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyJar
(
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
,
"Hello world"
);
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
,
"Hello world"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-exclude-artifact/verify.groovy
View file @
3d0219c3
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-exclude-artifact-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-exclude-artifact-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasNoEntryNameStartingWith
(
"lib/servlet-api-2.5.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-exclude-entry/verify.groovy
View file @
3d0219c3
...
...
@@ -17,11 +17,11 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-exclude-entry-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-exclude-entry-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasNoEntryNameStartingWith
(
"lib/servlet-api-2.5.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-exclude-group/verify.groovy
View file @
3d0219c3
...
...
@@ -17,11 +17,11 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-exclude-group-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-exclude-group-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasNoEntryNameStartingWith
(
"lib/log4j-api-2.4.1.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-executable/verify.groovy
View file @
3d0219c3
...
...
@@ -2,7 +2,6 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyJar
(
new
File
(
basedir
,
"target/jar-executable-0.0.1.BUILD-SNAPSHOT.jar"
),
new
File
(
basedir
,
"target/jar-executable-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
,
"Spring Boot Startup Script"
,
"MyFullyExecutableJarName"
,
"MyFullyExecutableJarDesc"
);
"MyFullyExecutableJarDesc"
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-non-executable/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyJar
(
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
,
false
);
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
),
"some.random.Main"
,
false
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-skip/verify.groovy
View file @
3d0219c3
import
static
org
.
junit
.
Assert
.
assertTrue
import
static
org
.
junit
.
Assert
.
assertFalse
File
f
=
new
File
(
basedir
,
"target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar"
)
File
f
=
new
File
(
basedir
,
"target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar"
)
assertTrue
'output file should have been generated'
,
f
.
exists
()
File
shouldNotExist
=
new
File
(
basedir
,
"target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar.original"
)
File
shouldNotExist
=
new
File
(
basedir
,
"target/jar-skip-0.0.1.BUILD-SNAPSHOT.jar.original"
)
assertFalse
'repackage goal should not have run. .original should not exist'
,
shouldNotExist
.
exists
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-system-scope-default/verify.groovy
View file @
3d0219c3
...
...
@@ -17,11 +17,11 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-system-scope-default-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-system-scope-default-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasNoEntryNameStartingWith
(
"BOOT-INF/lib/sample-1.0.0.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-system-scope/verify.groovy
View file @
3d0219c3
...
...
@@ -17,11 +17,11 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-system-scope-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-system-scope-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasEntryNameStartingWith
(
"BOOT-INF/lib/sample-1.0.0.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-test-scope/verify.groovy
View file @
3d0219c3
...
...
@@ -17,11 +17,11 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-test-scope-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-test-scope-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
super
.
verifyZipEntries
(
verifier
)
verifier
.
assertHasNoEntryNameStartingWith
(
"lib/log4j-api-2.4.1.jar"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-with-kotlin-module/verify.groovy
View file @
3d0219c3
...
...
@@ -17,7 +17,7 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-with-kotlin-module-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-with-kotlin-module-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
...
...
@@ -27,4 +27,4 @@ new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
verifier
.
assertHasNonUnpackEntry
(
"BOOT-INF/lib/kotlin-stdlib-"
)
verifier
.
assertHasNonUnpackEntry
(
"BOOT-INF/lib/kotlin-reflect-"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/jar-with-unpack/verify.groovy
View file @
3d0219c3
...
...
@@ -17,7 +17,7 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/jar-with-unpack-0.0.1.BUILD-SNAPSHOT.jar"
);
File
f
=
new
File
(
basedir
,
"target/jar-with-unpack-0.0.1.BUILD-SNAPSHOT.jar"
)
new
Verify
.
JarArchiveVerification
(
f
,
Verify
.
SAMPLE_APP
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
...
...
@@ -25,4 +25,4 @@ new Verify.JarArchiveVerification(f, Verify.SAMPLE_APP) {
verifier
.
assertHasUnpackEntry
(
"BOOT-INF/lib/spring-core-"
)
verifier
.
assertHasNonUnpackEntry
(
"BOOT-INF/lib/spring-context-"
)
}
}.
verify
()
;
}.
verify
()
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/prop/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyZip
(
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
)
);
new
File
(
basedir
,
"target/jar-0.0.1.BUILD-SNAPSHOT.jar"
)
)
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-reactor/verify.groovy
View file @
3d0219c3
...
...
@@ -17,7 +17,7 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"war/target/war-0.0.1.BUILD-SNAPSHOT.war"
)
File
f
=
new
File
(
basedir
,
"war/target/war-0.0.1.BUILD-SNAPSHOT.war"
)
new
Verify
.
WarArchiveVerification
(
f
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war-with-unpack/verify.groovy
View file @
3d0219c3
...
...
@@ -17,7 +17,7 @@
import
java.io.*
;
import
org.springframework.boot.maven.*
;
File
f
=
new
File
(
basedir
,
"target/war-0.0.1.BUILD-SNAPSHOT.war"
)
File
f
=
new
File
(
basedir
,
"target/war-0.0.1.BUILD-SNAPSHOT.war"
)
new
Verify
.
WarArchiveVerification
(
f
)
{
@Override
protected
void
verifyZipEntries
(
Verify
.
ArchiveVerifier
verifier
)
throws
Exception
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/it/war/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,6 @@ import java.io.*;
import
org.springframework.boot.maven.*
;
Verify
.
verifyWar
(
new
File
(
basedir
,
"target/war-0.0.1.BUILD-SNAPSHOT.war"
)
)
;
new
File
(
basedir
,
"target/war-0.0.1.BUILD-SNAPSHOT.war"
)
)
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
3d0219c3
...
...
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicReference;
import
javax.annotation.PostConstruct
;
import
org.assertj.core.api.Assertions
;
import
org.assertj.core.api.Condition
;
import
org.junit.After
;
import
org.junit.Before
;
...
...
@@ -1080,7 +1079,7 @@ public class SpringApplicationTests {
ExampleConfig
.
class
);
application
.
addListeners
(
(
ApplicationListener
<
ApplicationEnvironmentPreparedEvent
>)
(
event
)
->
{
Assertions
.
assertThat
(
event
.
getEnvironment
())
assertThat
(
event
.
getEnvironment
())
.
isInstanceOf
(
StandardServletEnvironment
.
class
);
TestPropertySourceUtils
.
addInlinedPropertiesToEnvironment
(
event
.
getEnvironment
(),
"foo=bar"
);
...
...
spring-boot-samples/spring-boot-sample-actuator-custom-security/src/test/java/sample/actuator/customsecurity/ManagementPortAndPathSampleActuatorApplicationTests.java
View file @
3d0219c3
...
...
@@ -43,10 +43,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Test
public
void
testHome
()
{
...
...
spring-boot-samples/spring-boot-sample-actuator-log4j2/src/test/java/sample/actuator/log4j2/SampleActuatorLog4J2ApplicationTests.java
View file @
3d0219c3
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
...
@@ -20,7 +20,6 @@ import java.util.Base64;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.assertj.core.api.Assertions
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
@@ -32,6 +31,7 @@ import org.springframework.boot.test.rule.OutputCapture;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.test.web.servlet.MockMvc
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
content
;
...
...
@@ -60,7 +60,7 @@ public class SampleActuatorLog4J2ApplicationTests {
@Test
public
void
testLogger
()
{
logger
.
info
(
"Hello World"
);
Assertions
.
assertThat
(
this
.
output
.
toString
()).
contains
(
"Hello World"
);
assertThat
(
this
.
output
.
toString
()).
contains
(
"Hello World"
);
}
@Test
...
...
spring-boot-samples/spring-boot-sample-actuator-ui/src/test/java/sample/actuator/ui/SampleActuatorUiApplicationPortTests.java
View file @
3d0219c3
...
...
@@ -43,10 +43,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
SampleActuatorUiApplicationPortTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Test
public
void
testHome
()
{
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java
View file @
3d0219c3
...
...
@@ -44,10 +44,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
ManagementAddressActuatorApplicationTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Test
public
void
testHome
()
{
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortAndPathSampleActuatorApplicationTests.java
View file @
3d0219c3
...
...
@@ -46,10 +46,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
ManagementPortAndPathSampleActuatorApplicationTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Autowired
private
Environment
environment
;
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java
View file @
3d0219c3
...
...
@@ -43,10 +43,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
ManagementPortSampleActuatorApplicationTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Test
public
void
testHome
()
{
...
...
spring-boot-samples/spring-boot-sample-custom-layout/src/it/custom/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
sample.layout.*
;
Verify
.
verify
(
new
File
(
basedir
,
"target/custom-0.0.1.BUILD-SNAPSHOT.jar"
),
"custom"
);
new
File
(
basedir
,
"target/custom-0.0.1.BUILD-SNAPSHOT.jar"
),
"custom"
)
spring-boot-samples/spring-boot-sample-custom-layout/src/it/default/verify.groovy
View file @
3d0219c3
...
...
@@ -2,6 +2,5 @@ import java.io.*;
import
sample.layout.*
;
Verify
.
verify
(
new
File
(
basedir
,
"target/default-0.0.1.BUILD-SNAPSHOT.jar"
),
"sample"
);
new
File
(
basedir
,
"target/default-0.0.1.BUILD-SNAPSHOT.jar"
),
"sample"
)
spring-boot-samples/spring-boot-sample-jersey/src/test/java/sample/jersey/JerseyApplicationPathAndManagementPortTests.java
View file @
3d0219c3
...
...
@@ -41,10 +41,10 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
JerseyApplicationPathAndManagementPortTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Autowired
private
TestRestTemplate
testRestTemplate
;
...
...
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/ManagementPortSampleSecureWebFluxTests.java
View file @
3d0219c3
...
...
@@ -18,7 +18,6 @@ package sample.secure.webflux;
import
java.util.Base64
;
import
org.assertj.core.api.Assertions
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
...
...
@@ -37,6 +36,8 @@ import org.springframework.security.web.server.SecurityWebFilterChain;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.test.web.reactive.server.WebTestClient
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
* Integration tests for separate management and main service ports.
*
...
...
@@ -50,10 +51,10 @@ import org.springframework.test.web.reactive.server.WebTestClient;
public
class
ManagementPortSampleSecureWebFluxTests
{
@LocalServerPort
private
int
port
=
9010
;
private
int
port
;
@LocalManagementPort
private
int
managementPort
=
9011
;
private
int
managementPort
;
@Autowired
private
WebTestClient
webClient
;
...
...
@@ -90,7 +91,7 @@ public class ManagementPortSampleSecureWebFluxTests {
String
.
class
)
.
exchange
().
expectStatus
().
isOk
().
expectBody
(
String
.
class
).
returnResult
()
.
getResponseBody
();
Assertions
.
assertThat
(
responseBody
).
contains
(
"\"status\":\"UP\""
);
assertThat
(
responseBody
).
contains
(
"\"status\":\"UP\""
);
}
private
String
getBasicAuth
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment