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
5d317f2d
Commit
5d317f2d
authored
Jun 25, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflection hack for Tomcat 8 API change
Fixes gh-1148
parent
fda24b84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
SkipPatternJarScanner.java
...k/boot/context/embedded/tomcat/SkipPatternJarScanner.java
+0
-0
TomcatEmbeddedContext.java
...k/boot/context/embedded/tomcat/TomcatEmbeddedContext.java
+15
-1
No files found.
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/
Custom
SkipPatternJarScanner.java
→
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/SkipPatternJarScanner.java
View file @
5d317f2d
File moved
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedContext.java
View file @
5d317f2d
...
...
@@ -16,9 +16,12 @@
package
org
.
springframework
.
boot
.
context
.
embedded
.
tomcat
;
import
java.lang.reflect.Method
;
import
org.apache.catalina.Container
;
import
org.apache.catalina.core.StandardContext
;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.ReflectionUtils
;
/**
* Tomcat {@link StandardContext} used by {@link TomcatEmbeddedServletContainer} to
...
...
@@ -45,7 +48,12 @@ class TomcatEmbeddedContext extends StandardContext {
if
(
classLoader
!=
null
)
{
existingLoader
=
ClassUtils
.
overrideThreadContextClassLoader
(
classLoader
);
}
super
.
loadOnStartup
(
findChildren
());
if
(
ClassUtils
.
isPresent
(
"org.apache.catalina.deploy.ErrorPage"
,
null
))
{
super
.
loadOnStartup
(
findChildren
());
}
else
{
callSuper
(
this
,
"loadOnStartup"
,
findChildren
(),
Container
[].
class
);
}
if
(
existingLoader
!=
null
)
{
ClassUtils
.
overrideThreadContextClassLoader
(
existingLoader
);
}
...
...
@@ -59,4 +67,10 @@ class TomcatEmbeddedContext extends StandardContext {
return
this
.
starter
;
}
private
void
callSuper
(
Object
target
,
String
name
,
Object
value
,
Class
<?>
type
)
{
Method
method
=
ReflectionUtils
.
findMethod
(
target
.
getClass
().
getSuperclass
(),
name
,
type
);
ReflectionUtils
.
invokeMethod
(
method
,
target
,
value
);
}
}
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