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
b48e31d9
Commit
b48e31d9
authored
Feb 25, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
4895b15b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+0
-3
UndertowEmbeddedServletContainer.java
...t/embedded/undertow/UndertowEmbeddedServletContainer.java
+22
-22
No files found.
spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
b48e31d9
...
...
@@ -263,7 +263,6 @@ public class SpringApplication {
* @return a running {@link ApplicationContext}
*/
public
ConfigurableApplicationContext
run
(
String
...
args
)
{
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
ConfigurableApplicationContext
context
=
null
;
...
...
@@ -481,12 +480,10 @@ public class SpringApplication {
this
.
mainApplicationClass
,
System
.
out
);
return
;
}
if
(
this
.
banner
!=
null
)
{
this
.
banner
.
printBanner
(
environment
,
this
.
mainApplicationClass
,
System
.
out
);
return
;
}
printBanner
();
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/undertow/UndertowEmbeddedServletContainer.java
View file @
b48e31d9
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
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.
...
...
@@ -49,10 +49,10 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
private
static
final
Log
logger
=
LogFactory
.
getLog
(
UndertowEmbeddedServletContainer
.
class
);
private
final
DeploymentManager
manager
;
private
final
Builder
builder
;
private
final
DeploymentManager
manager
;
private
final
String
contextPath
;
private
final
int
port
;
...
...
@@ -86,6 +86,25 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
+
getPortsDescription
());
}
private
Undertow
createUndertowServer
()
{
try
{
HttpHandler
servletHandler
=
this
.
manager
.
start
();
this
.
builder
.
setHandler
(
getContextHandler
(
servletHandler
));
return
this
.
builder
.
build
();
}
catch
(
ServletException
ex
)
{
throw
new
EmbeddedServletContainerException
(
"Unable to start embdedded Undertow"
,
ex
);
}
}
private
HttpHandler
getContextHandler
(
HttpHandler
servletHandler
)
{
if
(
StringUtils
.
isEmpty
(
this
.
contextPath
))
{
return
servletHandler
;
}
return
Handlers
.
path
().
addPrefixPath
(
this
.
contextPath
,
servletHandler
);
}
@SuppressWarnings
(
"rawtypes"
)
private
String
getPortsDescription
()
{
try
{
...
...
@@ -111,25 +130,6 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
return
String
.
valueOf
(
this
.
port
);
}
private
Undertow
createUndertowServer
()
{
try
{
HttpHandler
servletHandler
=
this
.
manager
.
start
();
this
.
builder
.
setHandler
(
getContextHandler
(
servletHandler
));
return
this
.
builder
.
build
();
}
catch
(
ServletException
ex
)
{
throw
new
EmbeddedServletContainerException
(
"Unable to start embdedded Undertow"
,
ex
);
}
}
private
HttpHandler
getContextHandler
(
HttpHandler
servletHandler
)
{
if
(
StringUtils
.
isEmpty
(
this
.
contextPath
))
{
return
servletHandler
;
}
return
Handlers
.
path
().
addPrefixPath
(
this
.
contextPath
,
servletHandler
);
}
@Override
public
synchronized
void
stop
()
throws
EmbeddedServletContainerException
{
if
(
this
.
started
)
{
...
...
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