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
07462be0
Commit
07462be0
authored
Nov 11, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
89173bd2
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
46 additions
and
35 deletions
+46
-35
Token.java
...mework/boot/actuate/autoconfigure/cloudfoundry/Token.java
+2
-1
CompositeHandlerExceptionResolverTests.java
...e/web/servlet/CompositeHandlerExceptionResolverTests.java
+10
-5
SpringIntegrationMetrics.java
...actuate/metrics/integration/SpringIntegrationMetrics.java
+2
-2
ConditionEvaluationReportLoggingListener.java
...ure/logging/ConditionEvaluationReportLoggingListener.java
+2
-1
ConditionEvaluationReportLoggingListenerTests.java
...ogging/ConditionEvaluationReportLoggingListenerTests.java
+1
-2
DefaultErrorWebExceptionHandlerIntegrationTest.java
...error/DefaultErrorWebExceptionHandlerIntegrationTest.java
+2
-2
TestPropertyValuesTests.java
...ringframework/boot/test/util/TestPropertyValuesTests.java
+4
-3
OriginTrackedPropertiesLoader.java
...ringframework/boot/env/OriginTrackedPropertiesLoader.java
+2
-2
JettyWebServer.java
...ringframework/boot/web/embedded/jetty/JettyWebServer.java
+2
-3
NettyReactiveWebServerFactory.java
...oot/web/embedded/netty/NettyReactiveWebServerFactory.java
+2
-1
SslServerCustomizer.java
...ramework/boot/web/embedded/netty/SslServerCustomizer.java
+10
-6
TomcatReactiveWebServerFactory.java
...t/web/embedded/tomcat/TomcatReactiveWebServerFactory.java
+1
-1
TomcatServletWebServerFactory.java
...ot/web/embedded/tomcat/TomcatServletWebServerFactory.java
+2
-1
TomcatWebServer.java
...ngframework/boot/web/embedded/tomcat/TomcatWebServer.java
+2
-2
TomcatServletWebServerFactoryTests.java
...b/embedded/tomcat/TomcatServletWebServerFactoryTests.java
+2
-1
SampleTomcatApplicationTests.java
...test/java/sample/tomcat/SampleTomcatApplicationTests.java
+0
-1
SampleUndertowApplicationTests.java
.../java/sample/undertow/SampleUndertowApplicationTests.java
+0
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/Token.java
View file @
07462be0
...
...
@@ -61,7 +61,8 @@ public class Token {
private
Map
<
String
,
Object
>
parseJson
(
String
base64
)
{
try
{
byte
[]
bytes
=
Base64Utils
.
decodeFromUrlSafeString
(
base64
);
return
JsonParserFactory
.
getJsonParser
().
parseMap
(
new
String
(
bytes
,
StandardCharsets
.
UTF_8
));
return
JsonParserFactory
.
getJsonParser
()
.
parseMap
(
new
String
(
bytes
,
StandardCharsets
.
UTF_8
));
}
catch
(
RuntimeException
ex
)
{
throw
new
CloudFoundryAuthorizationException
(
Reason
.
INVALID_TOKEN
,
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/CompositeHandlerExceptionResolverTests.java
View file @
07462be0
...
...
@@ -50,16 +50,20 @@ public class CompositeHandlerExceptionResolverTests {
@Test
public
void
resolverShouldDelegateToOtherResolversInContext
()
throws
Exception
{
load
(
TestConfiguration
.
class
);
CompositeHandlerExceptionResolver
resolver
=
(
CompositeHandlerExceptionResolver
)
this
.
context
.
getBean
(
DispatcherServlet
.
HANDLER_EXCEPTION_RESOLVER_BEAN_NAME
);
ModelAndView
resolved
=
resolver
.
resolveException
(
this
.
request
,
this
.
response
,
null
,
new
HttpRequestMethodNotSupportedException
(
"POST"
));
CompositeHandlerExceptionResolver
resolver
=
(
CompositeHandlerExceptionResolver
)
this
.
context
.
getBean
(
DispatcherServlet
.
HANDLER_EXCEPTION_RESOLVER_BEAN_NAME
);
ModelAndView
resolved
=
resolver
.
resolveException
(
this
.
request
,
this
.
response
,
null
,
new
HttpRequestMethodNotSupportedException
(
"POST"
));
assertThat
(
resolved
.
getViewName
()).
isEqualTo
(
"test-view"
);
}
@Test
public
void
resolverShouldAddDefaultResolverIfNonePresent
()
throws
Exception
{
load
(
BaseConfiguration
.
class
);
CompositeHandlerExceptionResolver
resolver
=
(
CompositeHandlerExceptionResolver
)
this
.
context
.
getBean
(
DispatcherServlet
.
HANDLER_EXCEPTION_RESOLVER_BEAN_NAME
);
ModelAndView
resolved
=
resolver
.
resolveException
(
this
.
request
,
this
.
response
,
null
,
new
HttpRequestMethodNotSupportedException
(
"POST"
));
CompositeHandlerExceptionResolver
resolver
=
(
CompositeHandlerExceptionResolver
)
this
.
context
.
getBean
(
DispatcherServlet
.
HANDLER_EXCEPTION_RESOLVER_BEAN_NAME
);
ModelAndView
resolved
=
resolver
.
resolveException
(
this
.
request
,
this
.
response
,
null
,
new
HttpRequestMethodNotSupportedException
(
"POST"
));
assertThat
(
resolved
).
isNotNull
();
}
...
...
@@ -94,7 +98,8 @@ public class CompositeHandlerExceptionResolverTests {
static
class
TestHandlerExceptionResolver
implements
HandlerExceptionResolver
{
@Override
public
ModelAndView
resolveException
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
{
public
ModelAndView
resolveException
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
{
return
new
ModelAndView
(
"test-view"
);
}
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/integration/SpringIntegrationMetrics.java
View file @
07462be0
...
...
@@ -150,8 +150,8 @@ public class SpringIntegrationMetrics implements MeterBinder, SmartInitializingS
private
<
T
>
void
registerFunctionCounter
(
MeterRegistry
registry
,
T
object
,
Iterable
<
Tag
>
tags
,
String
name
,
String
description
,
ToDoubleFunction
<
T
>
value
)
{
FunctionCounter
.
builder
(
name
,
object
,
value
).
tags
(
tags
)
.
description
(
description
).
register
(
registry
);
FunctionCounter
.
builder
(
name
,
object
,
value
).
tags
(
tags
)
.
description
(
description
)
.
register
(
registry
);
}
@Override
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListener.java
View file @
07462be0
...
...
@@ -57,7 +57,8 @@ public class ConditionEvaluationReportLoggingListener
@Override
public
void
initialize
(
ConfigurableApplicationContext
applicationContext
)
{
this
.
applicationContext
=
applicationContext
;
applicationContext
.
addApplicationListener
(
new
ConditionEvaluationReportListener
());
applicationContext
.
addApplicationListener
(
new
ConditionEvaluationReportListener
());
if
(
applicationContext
instanceof
GenericApplicationContext
)
{
// Get the report early in case the context fails to load
this
.
report
=
ConditionEvaluationReport
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/ConditionEvaluationReportLoggingListenerTests.java
View file @
07462be0
...
...
@@ -147,8 +147,7 @@ public class ConditionEvaluationReportLoggingListenerTests {
private
void
withDebugLogging
(
Runnable
runnable
)
{
LoggerContext
context
=
(
LoggerContext
)
StaticLoggerBinder
.
getSingleton
()
.
getLoggerFactory
();
Logger
logger
=
context
.
getLogger
(
ConditionEvaluationReportLoggingListener
.
class
);
Logger
logger
=
context
.
getLogger
(
ConditionEvaluationReportLoggingListener
.
class
);
Level
currentLevel
=
logger
.
getLevel
();
logger
.
setLevel
(
Level
.
DEBUG
);
try
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTest.java
View file @
07462be0
...
...
@@ -203,10 +203,10 @@ public class DefaultErrorWebExceptionHandlerIntegrationTest {
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
@Import
({
ReactiveWebServerAutoConfiguration
.
class
,
@Import
({
ReactiveWebServerAutoConfiguration
.
class
,
HttpHandlerAutoConfiguration
.
class
,
WebFluxAutoConfiguration
.
class
,
ErrorWebFluxAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
PropertyPlaceholderAutoConfiguration
.
class
})
private
@interface
MinimalWebConfiguration
{
}
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/util/TestPropertyValuesTests.java
View file @
07462be0
...
...
@@ -54,7 +54,8 @@ public class TestPropertyValuesTests {
@Test
public
void
applyToSystemPropertySource
()
throws
Exception
{
TestPropertyValues
.
of
(
"FOO_BAR=BAZ"
).
applyTo
(
this
.
environment
,
Type
.
SYSTEM_ENVIRONMENT
);
TestPropertyValues
.
of
(
"FOO_BAR=BAZ"
).
applyTo
(
this
.
environment
,
Type
.
SYSTEM_ENVIRONMENT
);
assertThat
(
this
.
environment
.
getProperty
(
"foo.bar"
)).
isEqualTo
(
"BAZ"
);
assertThat
(
this
.
environment
.
getPropertySources
().
contains
(
"test-"
+
StandardEnvironment
.
SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME
));
...
...
@@ -72,8 +73,8 @@ public class TestPropertyValuesTests {
throws
Exception
{
TestPropertyValues
.
of
(
"foo.bar=baz"
,
"hello.world=hi"
).
applyTo
(
this
.
environment
,
Type
.
MAP
,
"other"
);
TestPropertyValues
.
of
(
"FOO_BAR=BAZ"
).
applyTo
(
this
.
environment
,
Type
.
SYSTEM_ENVIRONMENT
,
"other"
);
TestPropertyValues
.
of
(
"FOO_BAR=BAZ"
).
applyTo
(
this
.
environment
,
Type
.
SYSTEM_ENVIRONMENT
,
"other"
);
assertThat
(
this
.
environment
.
getPropertySources
().
get
(
"other"
))
.
isInstanceOf
(
SystemEnvironmentPropertySource
.
class
);
assertThat
(
this
.
environment
.
getProperty
(
"foo.bar"
)).
isEqualTo
(
"BAZ"
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java
View file @
07462be0
...
...
@@ -155,8 +155,8 @@ class OriginTrackedPropertiesLoader {
private
int
character
;
CharacterReader
(
Resource
resource
)
throws
IOException
{
this
.
reader
=
new
LineNumberReader
(
new
InputStreamReader
(
resource
.
getInputStream
(),
StandardCharsets
.
ISO_8859_1
));
this
.
reader
=
new
LineNumberReader
(
new
InputStreamReader
(
resource
.
getInputStream
(),
StandardCharsets
.
ISO_8859_1
));
}
@Override
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyWebServer.java
View file @
07462be0
...
...
@@ -197,9 +197,8 @@ public class JettyWebServer implements WebServer {
private
String
getContextPath
()
{
return
Arrays
.
stream
(
this
.
server
.
getHandlers
())
.
filter
(
ContextHandler
.
class
::
isInstance
)
.
map
(
handler
->
((
ContextHandler
)
handler
).
getContextPath
())
.
collect
(
Collectors
.
joining
(
" "
));
.
filter
(
ContextHandler
.
class
::
isInstance
).
map
(
ContextHandler
.
class
::
cast
)
.
map
(
ContextHandler:
:
getContextPath
).
collect
(
Collectors
.
joining
(
" "
));
}
private
void
handleDeferredInitialize
(
Handler
...
handlers
)
throws
Exception
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java
View file @
07462be0
...
...
@@ -91,7 +91,8 @@ public class NettyReactiveWebServerFactory extends AbstractReactiveWebServerFact
return
HttpServer
.
builder
().
options
((
options
)
->
{
options
.
listenAddress
(
getListenAddress
());
if
(
getSsl
()
!=
null
&&
getSsl
().
isEnabled
())
{
SslServerCustomizer
sslServerCustomizer
=
new
SslServerCustomizer
(
getSsl
(),
getSslStoreProvider
());
SslServerCustomizer
sslServerCustomizer
=
new
SslServerCustomizer
(
getSsl
(),
getSslStoreProvider
());
sslServerCustomizer
.
customize
(
options
);
}
applyCustomizers
(
options
);
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/SslServerCustomizer.java
View file @
07462be0
...
...
@@ -31,8 +31,8 @@ import org.springframework.boot.web.server.SslStoreProvider;
import
org.springframework.util.ResourceUtils
;
/**
* {@link NettyServerCustomizer} that configures SSL for the
*
given Reactor Netty server
instance.
* {@link NettyServerCustomizer} that configures SSL for the
given Reactor Netty server
* instance.
*
* @author Brian Clozel
*/
...
...
@@ -66,7 +66,8 @@ public class SslServerCustomizer implements NettyServerCustomizer {
}
}
protected
KeyManagerFactory
getKeyManagerFactory
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
{
protected
KeyManagerFactory
getKeyManagerFactory
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
{
try
{
KeyStore
keyStore
=
getKeyStore
(
ssl
,
sslStoreProvider
);
KeyManagerFactory
keyManagerFactory
=
KeyManagerFactory
...
...
@@ -84,7 +85,8 @@ public class SslServerCustomizer implements NettyServerCustomizer {
}
}
private
KeyStore
getKeyStore
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
throws
Exception
{
private
KeyStore
getKeyStore
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
throws
Exception
{
if
(
sslStoreProvider
!=
null
)
{
return
sslStoreProvider
.
getKeyStore
();
}
...
...
@@ -92,7 +94,8 @@ public class SslServerCustomizer implements NettyServerCustomizer {
ssl
.
getKeyStorePassword
());
}
protected
TrustManagerFactory
getTrustManagerFactory
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
{
protected
TrustManagerFactory
getTrustManagerFactory
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
{
try
{
KeyStore
store
=
getTrustStore
(
ssl
,
sslStoreProvider
);
TrustManagerFactory
trustManagerFactory
=
TrustManagerFactory
...
...
@@ -105,7 +108,8 @@ public class SslServerCustomizer implements NettyServerCustomizer {
}
}
private
KeyStore
getTrustStore
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
throws
Exception
{
private
KeyStore
getTrustStore
(
Ssl
ssl
,
SslStoreProvider
sslStoreProvider
)
throws
Exception
{
if
(
sslStoreProvider
!=
null
)
{
return
sslStoreProvider
.
getTrustStore
();
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java
View file @
07462be0
...
...
@@ -57,7 +57,7 @@ public class TomcatReactiveWebServerFactory extends AbstractReactiveWebServerFac
private
String
protocol
=
DEFAULT_PROTOCOL
;
private
List
<
LifecycleListener
>
contextLifecycleListeners
=
new
ArrayList
<
LifecycleListener
>(
private
List
<
LifecycleListener
>
contextLifecycleListeners
=
new
ArrayList
<>(
Collections
.
singleton
(
new
AprLifecycleListener
()));
private
List
<
TomcatContextCustomizer
>
tomcatContextCustomizers
=
new
ArrayList
<>();
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java
View file @
07462be0
...
...
@@ -224,7 +224,8 @@ public class TomcatServletWebServerFactory extends AbstractServletWebServerFacto
private
void
configureTldSkipPatterns
(
TomcatEmbeddedContext
context
)
{
StandardJarScanFilter
filter
=
new
StandardJarScanFilter
();
filter
.
setTldSkip
(
StringUtils
.
collectionToCommaDelimitedString
(
this
.
tldSkipPatterns
));
filter
.
setTldSkip
(
StringUtils
.
collectionToCommaDelimitedString
(
this
.
tldSkipPatterns
));
context
.
getJarScanner
().
setJarScanFilter
(
filter
);
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatWebServer.java
View file @
07462be0
...
...
@@ -329,8 +329,8 @@ public class TomcatWebServer implements WebServer {
private
String
getContextPath
()
{
return
Arrays
.
stream
(
this
.
tomcat
.
getHost
().
findChildren
())
.
filter
(
TomcatEmbeddedContext
.
class
::
isInstance
)
.
map
(
context
->
((
TomcatEmbeddedContext
)
context
).
getPath
()
)
.
collect
(
Collectors
.
joining
(
" "
));
.
map
(
TomcatEmbeddedContext
.
class
::
cast
)
.
map
(
TomcatEmbeddedContext:
:
getPath
).
collect
(
Collectors
.
joining
(
" "
));
}
/**
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java
View file @
07462be0
...
...
@@ -398,7 +398,8 @@ public class TomcatServletWebServerFactoryTests
Tomcat
tomcat
=
((
TomcatWebServer
)
this
.
webServer
).
getTomcat
();
Context
context
=
(
Context
)
tomcat
.
getHost
().
findChildren
()[
0
];
JarScanFilter
jarScanFilter
=
context
.
getJarScanner
().
getJarScanFilter
();
Set
<
String
>
tldSkipSet
=
(
Set
<
String
>)
ReflectionTestUtils
.
getField
(
jarScanFilter
,
"tldSkipSet"
);
Set
<
String
>
tldSkipSet
=
(
Set
<
String
>)
ReflectionTestUtils
.
getField
(
jarScanFilter
,
"tldSkipSet"
);
assertThat
(
tldSkipSet
).
contains
(
"foo.jar"
,
"bar.jar"
);
}
...
...
spring-boot-samples/spring-boot-sample-tomcat/src/test/java/sample/tomcat/SampleTomcatApplicationTests.java
View file @
07462be0
...
...
@@ -17,7 +17,6 @@
package
sample
.
tomcat
;
import
java.io.ByteArrayInputStream
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.util.zip.GZIPInputStream
;
...
...
spring-boot-samples/spring-boot-sample-undertow/src/test/java/sample/undertow/SampleUndertowApplicationTests.java
View file @
07462be0
...
...
@@ -17,7 +17,6 @@
package
sample
.
undertow
;
import
java.io.ByteArrayInputStream
;
import
java.nio.charset.Charset
;
import
java.nio.charset.StandardCharsets
;
import
java.util.zip.GZIPInputStream
;
...
...
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