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
d2fed8bb
Commit
d2fed8bb
authored
Jan 13, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
57b99f0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
18 deletions
+18
-18
WebSocketAutoConfiguration.java
...t/autoconfigure/websocket/WebSocketAutoConfiguration.java
+3
-2
TomcatEmbeddedServletContainerFactory.java
...mbedded/tomcat/TomcatEmbeddedServletContainerFactory.java
+10
-10
ConfigurationWarningsApplicationContextInitializerTests.java
...figurationWarningsApplicationContextInitializerTests.java
+3
-3
Log4J2LoggingSystemTests.java
...amework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
+2
-3
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/websocket/WebSocketAutoConfiguration.java
View file @
d2fed8bb
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -25,6 +25,7 @@ import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainer
...
@@ -25,6 +25,7 @@ import org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainer
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
import
org.springframework.boot.autoconfigure.AutoConfigureBefore
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnJava.JavaVersion
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration
;
...
@@ -63,7 +64,7 @@ public class WebSocketAutoConfiguration {
...
@@ -63,7 +64,7 @@ public class WebSocketAutoConfiguration {
@Bean
@Bean
@ConditionalOnMissingBean
(
name
=
"websocketContainerCustomizer"
)
@ConditionalOnMissingBean
(
name
=
"websocketContainerCustomizer"
)
@ConditionalOnJava
(
ConditionalOnJava
.
JavaVersion
.
SEVEN
)
@ConditionalOnJava
(
JavaVersion
.
SEVEN
)
public
TomcatWebSocketContainerCustomizer
websocketContainerCustomizer
()
{
public
TomcatWebSocketContainerCustomizer
websocketContainerCustomizer
()
{
return
new
TomcatWebSocketContainerCustomizer
();
return
new
TomcatWebSocketContainerCustomizer
();
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java
View file @
d2fed8bb
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -661,9 +661,9 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -661,9 +661,9 @@ public class TomcatEmbeddedServletContainerFactory
private
static
class
TomcatErrorPage
{
private
static
class
TomcatErrorPage
{
private
static
final
String
ERROR_PAGE_
TOMCAT7
=
"org.apache.catalina.deploy
.ErrorPage"
;
private
static
final
String
ERROR_PAGE_
CLASS
=
"org.apache.tomcat.util.descriptor.web
.ErrorPage"
;
private
static
final
String
ERROR_PAGE_TOMCAT
=
"org.apache.tomcat.util.descriptor.web
.ErrorPage"
;
private
static
final
String
LEGACY_ERROR_PAGE_CLASS
=
"org.apache.catalina.deploy
.ErrorPage"
;
private
final
String
location
;
private
final
String
location
;
...
@@ -683,13 +683,13 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -683,13 +683,13 @@ public class TomcatEmbeddedServletContainerFactory
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
Object
nativePage
=
null
;
Object
nativePage
=
null
;
try
{
try
{
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_
TOMCAT
,
null
))
{
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_
CLASS
,
null
))
{
nativePage
=
BeanUtils
.
instantiate
(
ClassUtils
nativePage
=
BeanUtils
.
forName
(
ERROR_PAGE_TOMCAT
,
null
));
.
instantiate
(
ClassUtils
.
forName
(
ERROR_PAGE_CLASS
,
null
));
}
}
else
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_TOMCAT7
,
null
))
{
else
if
(
ClassUtils
.
isPresent
(
LEGACY_ERROR_PAGE_CLASS
,
null
))
{
nativePage
=
BeanUtils
.
instantiate
(
ClassUtils
nativePage
=
BeanUtils
.
instantiate
(
.
forName
(
ERROR_PAGE_TOMCAT7
,
null
));
ClassUtils
.
forName
(
LEGACY_ERROR_PAGE_CLASS
,
null
));
}
}
}
}
catch
(
ClassNotFoundException
ex
)
{
catch
(
ClassNotFoundException
ex
)
{
...
@@ -704,7 +704,7 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -704,7 +704,7 @@ public class TomcatEmbeddedServletContainerFactory
public
void
addToContext
(
Context
context
)
{
public
void
addToContext
(
Context
context
)
{
Assert
.
state
(
this
.
nativePage
!=
null
,
Assert
.
state
(
this
.
nativePage
!=
null
,
"Neither Tomcat 7 nor 8 detected so no native error page exists"
);
"Neither Tomcat 7 nor 8 detected so no native error page exists"
);
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_
TOMCAT
,
null
))
{
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_
CLASS
,
null
))
{
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
errorPage
=
(
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
)
this
.
nativePage
;
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
errorPage
=
(
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
)
this
.
nativePage
;
errorPage
.
setLocation
(
this
.
location
);
errorPage
.
setLocation
(
this
.
location
);
errorPage
.
setErrorCode
(
this
.
errorCode
);
errorPage
.
setErrorCode
(
this
.
errorCode
);
...
...
spring-boot/src/test/java/org/springframework/boot/context/ConfigurationWarningsApplicationContextInitializerTests.java
View file @
d2fed8bb
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -142,8 +142,8 @@ public class ConfigurationWarningsApplicationContextInitializerTests {
...
@@ -142,8 +142,8 @@ public class ConfigurationWarningsApplicationContextInitializerTests {
}
}
/**
/**
* Testable ComponentScanPackageCheck that doesn't need to use the default
* Testable ComponentScanPackageCheck that doesn't need to use the default
or
*
or
{@code org.springframework} package.
* {@code org.springframework} package.
*/
*/
static
class
TestComponentScanPackageCheck
extends
ComponentScanPackageCheck
{
static
class
TestComponentScanPackageCheck
extends
ComponentScanPackageCheck
{
...
...
spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
View file @
d2fed8bb
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
6
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -194,8 +194,7 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
...
@@ -194,8 +194,7 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
@Test
@Test
public
void
springConfigLocations
()
throws
Exception
{
public
void
springConfigLocations
()
throws
Exception
{
String
[]
locations
=
getSpringConfigLocations
(
this
.
loggingSystem
);
String
[]
locations
=
getSpringConfigLocations
(
this
.
loggingSystem
);
assertThat
(
locations
,
assertThat
(
locations
,
equalTo
(
new
String
[]
{
"log4j2-spring.xml"
}));
equalTo
(
new
String
[]
{
"log4j2-spring.xml"
}));
}
}
@Test
@Test
...
...
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