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
6619dfac
Commit
6619dfac
authored
Sep 10, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.3.x'
Closes gh-23241
parents
bcb294d9
e7e77a91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
Launcher.java
...c/main/java/org/springframework/boot/loader/Launcher.java
+1
-3
PropertiesLauncherTests.java
.../springframework/boot/loader/PropertiesLauncherTests.java
+5
-4
nested-jar-app.jar
...-loader/src/test/resources/nested-jars/nested-jar-app.jar
+0
-0
No files found.
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/Launcher.java
View file @
6619dfac
...
@@ -80,9 +80,7 @@ public abstract class Launcher {
...
@@ -80,9 +80,7 @@ public abstract class Launcher {
protected
ClassLoader
createClassLoader
(
Iterator
<
Archive
>
archives
)
throws
Exception
{
protected
ClassLoader
createClassLoader
(
Iterator
<
Archive
>
archives
)
throws
Exception
{
List
<
URL
>
urls
=
new
ArrayList
<>(
50
);
List
<
URL
>
urls
=
new
ArrayList
<>(
50
);
while
(
archives
.
hasNext
())
{
while
(
archives
.
hasNext
())
{
Archive
archive
=
archives
.
next
();
urls
.
add
(
archives
.
next
().
getUrl
());
urls
.
add
(
archive
.
getUrl
());
archive
.
close
();
}
}
return
createClassLoader
(
urls
.
toArray
(
new
URL
[
0
]));
return
createClassLoader
(
urls
.
toArray
(
new
URL
[
0
]));
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java
View file @
6619dfac
...
@@ -233,12 +233,13 @@ class PropertiesLauncherTests {
...
@@ -233,12 +233,13 @@ class PropertiesLauncherTests {
@Test
@Test
void
testUserSpecifiedNestedJarPath
()
throws
Exception
{
void
testUserSpecifiedNestedJarPath
()
throws
Exception
{
System
.
setProperty
(
"loader.path"
,
"nested-jars/
app.jar!/foo.jar
"
);
System
.
setProperty
(
"loader.path"
,
"nested-jars/
nested-jar-app.jar!/BOOT-INF/classes/
"
);
System
.
setProperty
(
"loader.main"
,
"demo.Application"
);
System
.
setProperty
(
"loader.main"
,
"demo.Application"
);
this
.
launcher
=
new
PropertiesLauncher
();
this
.
launcher
=
new
PropertiesLauncher
();
List
<
Archive
>
archives
=
new
ArrayList
<>();
assertThat
(
ReflectionTestUtils
.
getField
(
this
.
launcher
,
"paths"
).
toString
())
this
.
launcher
.
getClassPathArchivesIterator
().
forEachRemaining
(
archives:
:
add
);
.
isEqualTo
(
"[nested-jars/nested-jar-app.jar!/BOOT-INF/classes/]"
);
assertThat
(
archives
).
hasSize
(
1
).
areExactly
(
1
,
endingWith
(
"foo.jar!/"
));
this
.
launcher
.
launch
(
new
String
[
0
]);
waitFor
(
"Hello World"
);
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/resources/nested-jars/nested-jar-app.jar
0 → 100644
View file @
6619dfac
File added
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