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
586b52fa
Commit
586b52fa
authored
May 16, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Groovy template URLs
parent
c8ca2495
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
GroovyTemplateAutoConfiguration.java
...gure/groovy/template/GroovyTemplateAutoConfiguration.java
+9
-4
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/groovy/template/GroovyTemplateAutoConfiguration.java
View file @
586b52fa
...
@@ -23,6 +23,8 @@ import groovy.text.markup.TemplateConfiguration;
...
@@ -23,6 +23,8 @@ import groovy.text.markup.TemplateConfiguration;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLClassLoader
;
import
java.net.URLClassLoader
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.Servlet
;
import
javax.servlet.Servlet
;
...
@@ -99,11 +101,14 @@ public class GroovyTemplateAutoConfiguration {
...
@@ -99,11 +101,14 @@ public class GroovyTemplateAutoConfiguration {
Resource
[]
resources
=
this
.
resourceLoader
.
getResources
(
this
.
properties
Resource
[]
resources
=
this
.
resourceLoader
.
getResources
(
this
.
properties
.
getPrefix
());
.
getPrefix
());
if
(
resources
.
length
>
0
)
{
if
(
resources
.
length
>
0
)
{
URL
[]
urls
=
new
URL
[
resources
.
length
];
List
<
URL
>
urls
=
new
ArrayList
<
URL
>();
for
(
int
i
=
0
;
i
<
resources
.
length
;
i
++)
{
for
(
Resource
resource
:
resources
)
{
urls
[
i
]
=
resources
[
i
].
getURL
();
if
(
resource
.
exists
())
{
urls
.
add
(
resource
.
getURL
());
}
}
}
return
new
URLClassLoader
(
urls
,
this
.
classLoader
);
return
new
URLClassLoader
(
urls
.
toArray
(
new
URL
[
urls
.
size
()]),
this
.
classLoader
);
}
}
else
{
else
{
return
this
.
classLoader
;
return
this
.
classLoader
;
...
...
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