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
3c4f1a7a
Commit
3c4f1a7a
authored
Sep 20, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #54: stop servlet container if context fails to start
parent
97af88a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
AnnotationConfigEmbeddedWebApplicationContext.java
...bedded/AnnotationConfigEmbeddedWebApplicationContext.java
+0
-6
EmbeddedWebApplicationContext.java
.../boot/context/embedded/EmbeddedWebApplicationContext.java
+12
-0
XmlEmbeddedWebApplicationContext.java
...ot/context/embedded/XmlEmbeddedWebApplicationContext.java
+0
-5
No files found.
spring-boot/src/main/java/org/springframework/boot/context/embedded/AnnotationConfigEmbeddedWebApplicationContext.java
View file @
3c4f1a7a
...
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
context
.
embedded
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.support.BeanNameGenerator
;
import
org.springframework.context.annotation.AnnotatedBeanDefinitionReader
;
...
...
@@ -188,9 +187,4 @@ public class AnnotationConfigEmbeddedWebApplicationContext extends
}
}
@Override
public
final
void
refresh
()
throws
BeansException
,
IllegalStateException
{
super
.
refresh
();
}
}
spring-boot/src/main/java/org/springframework/boot/context/embedded/EmbeddedWebApplicationContext.java
View file @
3c4f1a7a
...
...
@@ -35,6 +35,7 @@ import javax.servlet.ServletException;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextException
;
...
...
@@ -114,6 +115,17 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
beanFactory
.
ignoreDependencyInterface
(
ServletContextAware
.
class
);
}
@Override
public
final
void
refresh
()
throws
BeansException
,
IllegalStateException
{
try
{
super
.
refresh
();
}
catch
(
RuntimeException
e
)
{
stopAndReleaseEmbeddedServletContainer
();
throw
e
;
}
}
@Override
protected
void
onRefresh
()
{
super
.
onRefresh
();
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/XmlEmbeddedWebApplicationContext.java
View file @
3c4f1a7a
...
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
context
.
embedded
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.io.ClassPathResource
;
...
...
@@ -132,8 +131,4 @@ public class XmlEmbeddedWebApplicationContext extends EmbeddedWebApplicationCont
this
.
reader
.
loadBeanDefinitions
(
resources
);
}
@Override
public
final
void
refresh
()
throws
BeansException
,
IllegalStateException
{
super
.
refresh
();
}
}
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