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
6e09e497
Commit
6e09e497
authored
May 04, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
86f43c47
Changes
96
Hide whitespace changes
Inline
Side-by-side
Showing
96 changed files
with
217 additions
and
135 deletions
+217
-135
CloudFoundryWebEndpointServletHandlerMapping.java
...servlet/CloudFoundryWebEndpointServletHandlerMapping.java
+1
-0
ServletEndpointManagementContextConfiguration.java
...nt/web/ServletEndpointManagementContextConfiguration.java
+0
-1
MeterRegistryConfigurer.java
...ctuate/autoconfigure/metrics/MeterRegistryConfigurer.java
+5
-5
HealthEndpointAutoConfigurationTests.java
...onfigure/health/HealthEndpointAutoConfigurationTests.java
+1
-0
SignalFxMetricsExportAutoConfigurationTests.java
...signalfx/SignalFxMetricsExportAutoConfigurationTests.java
+1
-2
SimplePropertiesTests.java
...onfigure/metrics/export/simple/SimplePropertiesTests.java
+0
-1
BeansEndpoint.java
...org/springframework/boot/actuate/beans/BeansEndpoint.java
+0
-1
ConfigurationPropertiesReportEndpoint.java
...ext/properties/ConfigurationPropertiesReportEndpoint.java
+1
-0
MissingParametersException.java
...t/actuate/endpoint/invoke/MissingParametersException.java
+1
-0
EndpointMBean.java
...ingframework/boot/actuate/endpoint/jmx/EndpointMBean.java
+2
-2
DiscoveredJmxOperation.java
...tuate/endpoint/jmx/annotation/DiscoveredJmxOperation.java
+1
-0
EndpointMapping.java
...gframework/boot/actuate/endpoint/web/EndpointMapping.java
+0
-1
DiscoveredWebEndpoint.java
...ctuate/endpoint/web/annotation/DiscoveredWebEndpoint.java
+1
-0
AbstractWebFluxEndpointHandlerMapping.java
...t/web/reactive/AbstractWebFluxEndpointHandlerMapping.java
+1
-0
MetricsEndpoint.java
...springframework/boot/actuate/metrics/MetricsEndpoint.java
+2
-0
MetricsWebFilter.java
...actuate/metrics/web/reactive/server/MetricsWebFilter.java
+10
-11
MappingDescriptionProvider.java
...boot/actuate/web/mappings/MappingDescriptionProvider.java
+0
-1
FilterRegistrationMappingDescription.java
...appings/servlet/FilterRegistrationMappingDescription.java
+0
-2
RegistrationMappingDescription.java
.../web/mappings/servlet/RegistrationMappingDescription.java
+0
-2
ServletRegistrationMappingDescription.java
...ppings/servlet/ServletRegistrationMappingDescription.java
+0
-1
OperationMethodTests.java
...actuate/endpoint/invoke/reflect/OperationMethodTests.java
+1
-0
TestJmxOperationResponseMapper.java
.../actuate/endpoint/jmx/TestJmxOperationResponseMapper.java
+1
-0
ControllerEndpointDiscovererTests.java
...int/web/annotation/ControllerEndpointDiscovererTests.java
+19
-13
ServletEndpointDiscovererTests.java
...dpoint/web/annotation/ServletEndpointDiscovererTests.java
+12
-7
ContextFactory.java
...mework/boot/actuate/endpoint/web/test/ContextFactory.java
+1
-0
MetricsWebFilterTests.java
...te/metrics/web/reactive/server/MetricsWebFilterTests.java
+1
-0
HttpExchangeTracerTests.java
...work/boot/actuate/trace/http/HttpExchangeTracerTests.java
+1
-0
RabbitProperties.java
...ngframework/boot/autoconfigure/amqp/RabbitProperties.java
+1
-0
CacheAutoConfiguration.java
...work/boot/autoconfigure/cache/CacheAutoConfiguration.java
+1
-2
FreeMarkerServletWebConfiguration.java
...nfigure/freemarker/FreeMarkerServletWebConfiguration.java
+1
-0
GsonBuilderCustomizer.java
...mework/boot/autoconfigure/gson/GsonBuilderCustomizer.java
+1
-0
DataSourceBeanCreationFailureAnalyzer.java
...configure/jdbc/DataSourceBeanCreationFailureAnalyzer.java
+2
-2
StaticResourceRequest.java
...utoconfigure/security/reactive/StaticResourceRequest.java
+1
-0
SessionAutoConfiguration.java
.../boot/autoconfigure/session/SessionAutoConfiguration.java
+1
-0
TransactionAutoConfiguration.java
...toconfigure/transaction/TransactionAutoConfiguration.java
+1
-0
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+1
-0
WebFluxAutoConfiguration.java
.../autoconfigure/web/reactive/WebFluxAutoConfiguration.java
+1
-0
CacheAutoConfigurationTests.java
...boot/autoconfigure/cache/CacheAutoConfigurationTests.java
+5
-8
SampleAutoConfiguration.java
...gure/condition/config/second/SampleAutoConfiguration.java
+0
-1
CassandraDataAutoConfigurationTests.java
...e/data/cassandra/CassandraDataAutoConfigurationTests.java
+1
-0
CouchbaseDataAutoConfigurationTests.java
...e/data/couchbase/CouchbaseDataAutoConfigurationTests.java
+1
-0
ElasticsearchNodeTemplate.java
...nfigure/data/elasticsearch/ElasticsearchNodeTemplate.java
+1
-0
GsonAutoConfigurationTests.java
...k/boot/autoconfigure/gson/GsonAutoConfigurationTests.java
+1
-0
IntegrationAutoConfigurationTests.java
...figure/integration/IntegrationAutoConfigurationTests.java
+4
-4
ActiveMQAutoConfigurationTests.java
...onfigure/jms/activemq/ActiveMQAutoConfigurationTests.java
+1
-0
ArtemisEmbeddedConfigurationFactoryTests.java
...jms/artemis/ArtemisEmbeddedConfigurationFactoryTests.java
+1
-0
JsonbAutoConfigurationTests.java
...boot/autoconfigure/jsonb/JsonbAutoConfigurationTests.java
+1
-0
MustacheAutoConfigurationTests.java
...utoconfigure/mustache/MustacheAutoConfigurationTests.java
+1
-0
QuartzAutoConfigurationTests.java
...ot/autoconfigure/quartz/QuartzAutoConfigurationTests.java
+21
-19
WebFluxSecurityConfigurationTests.java
.../security/reactive/WebFluxSecurityConfigurationTests.java
+1
-0
TransactionAutoConfigurationTests.java
...figure/transaction/TransactionAutoConfigurationTests.java
+1
-0
ValidationAutoConfigurationTests.java
...onfigure/validation/ValidationAutoConfigurationTests.java
+3
-0
WebFluxAutoConfigurationTests.java
...configure/web/reactive/WebFluxAutoConfigurationTests.java
+3
-0
DefaultErrorWebExceptionHandlerIntegrationTests.java
...rror/DefaultErrorWebExceptionHandlerIntegrationTests.java
+1
-0
TomcatServletWebServerFactoryCustomizerTests.java
...servlet/TomcatServletWebServerFactoryCustomizerTests.java
+1
-0
WebMvcAutoConfigurationTests.java
...toconfigure/web/servlet/WebMvcAutoConfigurationTests.java
+5
-4
WelcomePageHandlerMappingTests.java
...configure/web/servlet/WelcomePageHandlerMappingTests.java
+1
-2
ProjectGenerationRequest.java
...ework/boot/cli/command/init/ProjectGenerationRequest.java
+2
-1
JestClientCustomizationExample.java
...cs/elasticsearch/jest/JestClientCustomizationExample.java
+1
-0
UserServiceAutoConfigurationTests.java
...docs/autoconfigure/UserServiceAutoConfigurationTests.java
+1
-0
DataNeo4jTypeExcludeFilter.java
.../autoconfigure/data/neo4j/DataNeo4jTypeExcludeFilter.java
+1
-0
RestDocsTestExecutionListener.java
...autoconfigure/restdocs/RestDocsTestExecutionListener.java
+1
-2
ExampleEntry.java
...ework/boot/test/autoconfigure/data/ldap/ExampleEntry.java
+1
-0
ExampleRepository.java
...boot/test/autoconfigure/data/neo4j/ExampleRepository.java
+1
-0
FilteredClassLoader.java
...pringframework/boot/test/context/FilteredClassLoader.java
+1
-0
ImportsContextCustomizer.java
...framework/boot/test/context/ImportsContextCustomizer.java
+1
-0
JsonbTester.java
.../java/org/springframework/boot/test/json/JsonbTester.java
+1
-0
ApplicationContextAssertTests.java
...t/test/context/assertj/ApplicationContextAssertTests.java
+1
-0
TestMethodConfiguration.java
.../boot/autoconfigureprocessor/TestMethodConfiguration.java
+1
-0
TestOrderedClassConfiguration.java
...autoconfigureprocessor/TestOrderedClassConfiguration.java
+1
-0
ConfigurationMetadata.java
...onfigurationprocessor/metadata/ConfigurationMetadata.java
+2
-2
ConfigurationMetadataAnnotationProcessorTests.java
...cessor/ConfigurationMetadataAnnotationProcessorTests.java
+2
-2
RandomAccessData.java
...rg/springframework/boot/loader/data/RandomAccessData.java
+4
-2
RandomAccessDataFileTests.java
...framework/boot/loader/data/RandomAccessDataFileTests.java
+6
-3
AsciiBytesTests.java
.../org/springframework/boot/loader/jar/AsciiBytesTests.java
+1
-0
PropertyMapper.java
...ringframework/boot/context/properties/PropertyMapper.java
+1
-0
AggregateBinder.java
...amework/boot/context/properties/bind/AggregateBinder.java
+1
-0
SystemEnvironmentOrigin.java
.../springframework/boot/origin/SystemEnvironmentOrigin.java
+1
-0
LambdaSafe.java
...c/main/java/org/springframework/boot/util/LambdaSafe.java
+1
-0
SslConnectorCustomizer.java
...work/boot/web/embedded/tomcat/SslConnectorCustomizer.java
+3
-3
UndertowCompressionConfigurer.java
.../web/embedded/undertow/UndertowCompressionConfigurer.java
+1
-0
UndertowServletWebServerFactory.java
...eb/embedded/undertow/UndertowServletWebServerFactory.java
+2
-0
ServletRegistrationBean.java
...ngframework/boot/web/servlet/ServletRegistrationBean.java
+1
-0
AbstractServletWebServerFactory.java
...t/web/servlet/server/AbstractServletWebServerFactory.java
+0
-1
ConfigFileApplicationListenerTests.java
...ot/context/config/ConfigFileApplicationListenerTests.java
+2
-2
ConfigurationPropertiesTests.java
...boot/context/properties/ConfigurationPropertiesTests.java
+4
-0
BackCompatibilityBinderIntegrationTests.java
...perties/bind/BackCompatibilityBinderIntegrationTests.java
+1
-0
CollectionBinderTests.java
...k/boot/context/properties/bind/CollectionBinderTests.java
+2
-0
BindFailureAnalyzerTests.java
...k/boot/diagnostics/analyzer/BindFailureAnalyzerTests.java
+1
-0
BindValidationFailureAnalyzerTests.java
...gnostics/analyzer/BindValidationFailureAnalyzerTests.java
+1
-0
SpringApplicationJsonEnvironmentPostProcessorTests.java
...v/SpringApplicationJsonEnvironmentPostProcessorTests.java
+1
-0
SystemEnvironmentOriginTests.java
...ngframework/boot/origin/SystemEnvironmentOriginTests.java
+1
-0
SslConnectorCustomizerTests.java
...boot/web/embedded/tomcat/SslConnectorCustomizerTests.java
+22
-11
UndertowServletWebServerFactoryTests.java
...bedded/undertow/UndertowServletWebServerFactoryTests.java
+4
-4
AbstractServletWebServerFactoryTests.java
.../servlet/server/AbstractServletWebServerFactoryTests.java
+2
-2
ApplicationBuilder.java
...ngframework/boot/context/embedded/ApplicationBuilder.java
+8
-8
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/servlet/CloudFoundryWebEndpointServletHandlerMapping.java
View file @
6e09e497
...
@@ -134,6 +134,7 @@ class CloudFoundryWebEndpointServletHandlerMapping
...
@@ -134,6 +134,7 @@ class CloudFoundryWebEndpointServletHandlerMapping
}
}
return
this
.
delegate
.
handle
(
request
,
body
);
return
this
.
delegate
.
handle
(
request
,
body
);
}
}
}
}
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.java
View file @
6e09e497
...
@@ -31,7 +31,6 @@ import org.springframework.context.annotation.Configuration;
...
@@ -31,7 +31,6 @@ import org.springframework.context.annotation.Configuration;
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Andy Wilkinson
* @author Andy Wilkinson
*
* @since 2.0.0
* @since 2.0.0
*/
*/
@Configuration
@Configuration
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurer.java
View file @
6e09e497
...
@@ -28,11 +28,11 @@ import io.micrometer.core.instrument.config.MeterFilter;
...
@@ -28,11 +28,11 @@ import io.micrometer.core.instrument.config.MeterFilter;
import
org.springframework.boot.util.LambdaSafe
;
import
org.springframework.boot.util.LambdaSafe
;
/**
/**
* Configurer to apply {@link MeterRegistryCustomizer customizers},
* Configurer to apply {@link MeterRegistryCustomizer customizers},
{@link MeterFilter
*
{@link MeterFilter filters}, {@link MeterBinder binders} and {@link Metrics#addRegistry
*
filters}, {@link MeterBinder binders} and {@link Metrics#addRegistry global
*
global registration} to {@link MeterRegistry meter registries}. This configurer
*
registration} to {@link MeterRegistry meter registries}. This configurer intentionally
*
intentionally skips {@link CompositeMeterRegistry} with the assumptions that the
*
skips {@link CompositeMeterRegistry} with the assumptions that the registries it
*
registries it
contains are beans and will be customized directly.
* contains are beans and will be customized directly.
*
*
* @author Jon Schneider
* @author Jon Schneider
* @author Phillip Webb
* @author Phillip Webb
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java
View file @
6e09e497
...
@@ -124,4 +124,5 @@ public class HealthEndpointAutoConfigurationTests {
...
@@ -124,4 +124,5 @@ public class HealthEndpointAutoConfigurationTests {
}
}
}
}
}
}
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/signalfx/SignalFxMetricsExportAutoConfigurationTests.java
View file @
6e09e497
...
@@ -71,8 +71,7 @@ public class SignalFxMetricsExportAutoConfigurationTests {
...
@@ -71,8 +71,7 @@ public class SignalFxMetricsExportAutoConfigurationTests {
@Test
@Test
public
void
autoConfigurationCanBeDisabled
()
{
public
void
autoConfigurationCanBeDisabled
()
{
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
BaseConfiguration
.
class
)
.
withPropertyValues
(
.
withPropertyValues
(
"management.metrics.export.signalfx.enabled=false"
)
"management.metrics.export.signalfx.enabled=false"
)
.
run
((
context
)
->
assertThat
(
context
)
.
run
((
context
)
->
assertThat
(
context
)
.
doesNotHaveBean
(
SignalFxMeterRegistry
.
class
)
.
doesNotHaveBean
(
SignalFxMeterRegistry
.
class
)
.
doesNotHaveBean
(
SignalFxConfig
.
class
));
.
doesNotHaveBean
(
SignalFxConfig
.
class
));
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/simple/SimplePropertiesTests.java
View file @
6e09e497
...
@@ -22,7 +22,6 @@ import org.junit.Test;
...
@@ -22,7 +22,6 @@ import org.junit.Test;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
/**
/**
*
* @author Stephane Nicoll
* @author Stephane Nicoll
*/
*/
public
class
SimplePropertiesTests
{
public
class
SimplePropertiesTests
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/beans/BeansEndpoint.java
View file @
6e09e497
...
@@ -44,7 +44,6 @@ public class BeansEndpoint {
...
@@ -44,7 +44,6 @@ public class BeansEndpoint {
/**
/**
* Creates a new {@code BeansEndpoint} that will describe the beans in the given
* Creates a new {@code BeansEndpoint} that will describe the beans in the given
* {@code context} and all of its ancestors.
* {@code context} and all of its ancestors.
*
* @param context the application context
* @param context the application context
* @see ConfigurableApplicationContext#getParent()
* @see ConfigurableApplicationContext#getParent()
*/
*/
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java
View file @
6e09e497
...
@@ -335,6 +335,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
...
@@ -335,6 +335,7 @@ public class ConfigurationPropertiesReportEndpoint implements ApplicationContext
}
}
super
.
serializeAsField
(
pojo
,
jgen
,
provider
,
writer
);
super
.
serializeAsField
(
pojo
,
jgen
,
provider
,
writer
);
}
}
}
}
/**
/**
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/invoke/MissingParametersException.java
View file @
6e09e497
...
@@ -51,4 +51,5 @@ public final class MissingParametersException extends InvalidEndpointRequestExce
...
@@ -51,4 +51,5 @@ public final class MissingParametersException extends InvalidEndpointRequestExce
public
Set
<
OperationParameter
>
getMissingParameters
()
{
public
Set
<
OperationParameter
>
getMissingParameters
()
{
return
this
.
missingParameters
;
return
this
.
missingParameters
;
}
}
}
}
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBean.java
View file @
6e09e497
...
@@ -107,8 +107,8 @@ public class EndpointMBean implements DynamicMBean {
...
@@ -107,8 +107,8 @@ public class EndpointMBean implements DynamicMBean {
return
this
.
responseMapper
.
mapResponse
(
result
);
return
this
.
responseMapper
.
mapResponse
(
result
);
}
}
catch
(
InvalidEndpointRequestException
ex
)
{
catch
(
InvalidEndpointRequestException
ex
)
{
throw
new
ReflectionException
(
new
IllegalArgumentException
(
throw
new
ReflectionException
(
new
IllegalArgumentException
(
ex
.
getMessage
()),
ex
.
getMessage
())
,
ex
.
getMessage
())
;
ex
.
getMessage
());
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
throw
new
MBeanException
(
translateIfNecessary
(
ex
),
ex
.
getMessage
());
throw
new
MBeanException
(
translateIfNecessary
(
ex
),
ex
.
getMessage
());
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/annotation/DiscoveredJmxOperation.java
View file @
6e09e497
...
@@ -210,4 +210,5 @@ class DiscoveredJmxOperation extends AbstractDiscoveredOperation implements JmxO
...
@@ -210,4 +210,5 @@ class DiscoveredJmxOperation extends AbstractDiscoveredOperation implements JmxO
}
}
}
}
}
}
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/EndpointMapping.java
View file @
6e09e497
...
@@ -30,7 +30,6 @@ public class EndpointMapping {
...
@@ -30,7 +30,6 @@ public class EndpointMapping {
/**
/**
* Creates a new {@code EndpointMapping} using the given {@code path}.
* Creates a new {@code EndpointMapping} using the given {@code path}.
*
* @param path the path
* @param path the path
*/
*/
public
EndpointMapping
(
String
path
)
{
public
EndpointMapping
(
String
path
)
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/annotation/DiscoveredWebEndpoint.java
View file @
6e09e497
...
@@ -44,4 +44,5 @@ class DiscoveredWebEndpoint extends AbstractDiscoveredEndpoint<WebOperation>
...
@@ -44,4 +44,5 @@ class DiscoveredWebEndpoint extends AbstractDiscoveredEndpoint<WebOperation>
public
String
getRootPath
()
{
public
String
getRootPath
()
{
return
this
.
rootPath
;
return
this
.
rootPath
;
}
}
}
}
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/AbstractWebFluxEndpointHandlerMapping.java
View file @
6e09e497
...
@@ -251,6 +251,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping
...
@@ -251,6 +251,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping
Mono
<
ResponseEntity
<
Object
>>
handle
(
ServerWebExchange
exchange
,
Mono
<
ResponseEntity
<
Object
>>
handle
(
ServerWebExchange
exchange
,
Map
<
String
,
String
>
body
);
Map
<
String
,
String
>
body
);
}
}
/**
/**
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/MetricsEndpoint.java
View file @
6e09e497
...
@@ -173,6 +173,7 @@ public class MetricsEndpoint {
...
@@ -173,6 +173,7 @@ public class MetricsEndpoint {
public
Set
<
String
>
getNames
()
{
public
Set
<
String
>
getNames
()
{
return
this
.
names
;
return
this
.
names
;
}
}
}
}
/**
/**
...
@@ -228,6 +229,7 @@ public class MetricsEndpoint {
...
@@ -228,6 +229,7 @@ public class MetricsEndpoint {
public
Set
<
String
>
getValues
()
{
public
Set
<
String
>
getValues
()
{
return
this
.
values
;
return
this
.
values
;
}
}
}
}
/**
/**
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilter.java
View file @
6e09e497
...
@@ -61,18 +61,17 @@ public class MetricsWebFilter implements WebFilter {
...
@@ -61,18 +61,17 @@ public class MetricsWebFilter implements WebFilter {
private
Publisher
<
Void
>
filter
(
ServerWebExchange
exchange
,
Mono
<
Void
>
call
)
{
private
Publisher
<
Void
>
filter
(
ServerWebExchange
exchange
,
Mono
<
Void
>
call
)
{
long
start
=
System
.
nanoTime
();
long
start
=
System
.
nanoTime
();
ServerHttpResponse
response
=
exchange
.
getResponse
();
ServerHttpResponse
response
=
exchange
.
getResponse
();
return
call
.
doOnSuccess
((
done
)
->
success
(
exchange
,
start
))
return
call
.
doOnSuccess
((
done
)
->
success
(
exchange
,
start
)).
doOnError
((
cause
)
->
{
.
doOnError
((
cause
)
->
{
if
(
response
.
isCommitted
())
{
if
(
response
.
isCommitted
())
{
error
(
exchange
,
start
,
cause
);
error
(
exchange
,
start
,
cause
);
}
}
else
{
else
{
response
.
beforeCommit
(()
->
{
response
.
beforeCommit
(()
->
{
error
(
exchange
,
start
,
cause
);
error
(
exchange
,
start
,
cause
);
return
Mono
.
empty
();
return
Mono
.
empty
();
});
}
});
});
}
});
}
}
private
void
success
(
ServerWebExchange
exchange
,
long
start
)
{
private
void
success
(
ServerWebExchange
exchange
,
long
start
)
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/MappingDescriptionProvider.java
View file @
6e09e497
...
@@ -31,7 +31,6 @@ public interface MappingDescriptionProvider {
...
@@ -31,7 +31,6 @@ public interface MappingDescriptionProvider {
/**
/**
* Returns the name of the mappings described by this provider.
* Returns the name of the mappings described by this provider.
*
* @return the name of the mappings
* @return the name of the mappings
*/
*/
String
getMappingName
();
String
getMappingName
();
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/FilterRegistrationMappingDescription.java
View file @
6e09e497
...
@@ -40,7 +40,6 @@ public class FilterRegistrationMappingDescription
...
@@ -40,7 +40,6 @@ public class FilterRegistrationMappingDescription
/**
/**
* Returns the servlet name mappings for the registered filter.
* Returns the servlet name mappings for the registered filter.
*
* @return the mappings
* @return the mappings
*/
*/
public
Collection
<
String
>
getServletNameMappings
()
{
public
Collection
<
String
>
getServletNameMappings
()
{
...
@@ -49,7 +48,6 @@ public class FilterRegistrationMappingDescription
...
@@ -49,7 +48,6 @@ public class FilterRegistrationMappingDescription
/**
/**
* Returns the URL pattern mappings for the registered filter.
* Returns the URL pattern mappings for the registered filter.
*
* @return the mappings
* @return the mappings
*/
*/
public
Collection
<
String
>
getUrlPatternMappings
()
{
public
Collection
<
String
>
getUrlPatternMappings
()
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/RegistrationMappingDescription.java
View file @
6e09e497
...
@@ -40,7 +40,6 @@ public class RegistrationMappingDescription<T extends Registration> {
...
@@ -40,7 +40,6 @@ public class RegistrationMappingDescription<T extends Registration> {
/**
/**
* Returns the name of the registered Filter or Servlet.
* Returns the name of the registered Filter or Servlet.
*
* @return the name
* @return the name
*/
*/
public
String
getName
()
{
public
String
getName
()
{
...
@@ -49,7 +48,6 @@ public class RegistrationMappingDescription<T extends Registration> {
...
@@ -49,7 +48,6 @@ public class RegistrationMappingDescription<T extends Registration> {
/**
/**
* Returns the class name of the registered Filter or Servlet.
* Returns the class name of the registered Filter or Servlet.
*
* @return the class name
* @return the class name
*/
*/
public
String
getClassName
()
{
public
String
getClassName
()
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/mappings/servlet/ServletRegistrationMappingDescription.java
View file @
6e09e497
...
@@ -41,7 +41,6 @@ public class ServletRegistrationMappingDescription
...
@@ -41,7 +41,6 @@ public class ServletRegistrationMappingDescription
/**
/**
* Returns the mappings for the registered servlet.
* Returns the mappings for the registered servlet.
*
* @return the mappings
* @return the mappings
*/
*/
public
Collection
<
String
>
getMappings
()
{
public
Collection
<
String
>
getMappings
()
{
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/invoke/reflect/OperationMethodTests.java
View file @
6e09e497
...
@@ -81,4 +81,5 @@ public class OperationMethodTests {
...
@@ -81,4 +81,5 @@ public class OperationMethodTests {
String
example
(
String
name
)
{
String
example
(
String
name
)
{
return
name
;
return
name
;
}
}
}
}
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/jmx/TestJmxOperationResponseMapper.java
View file @
6e09e497
...
@@ -32,4 +32,5 @@ class TestJmxOperationResponseMapper implements JmxOperationResponseMapper {
...
@@ -32,4 +32,5 @@ class TestJmxOperationResponseMapper implements JmxOperationResponseMapper {
public
Class
<?>
mapResponseType
(
Class
<?>
responseType
)
{
public
Class
<?>
mapResponseType
(
Class
<?>
responseType
)
{
return
responseType
;
return
responseType
;
}
}
}
}
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ControllerEndpointDiscovererTests.java
View file @
6e09e497
...
@@ -57,16 +57,17 @@ public class ControllerEndpointDiscovererTests {
...
@@ -57,16 +57,17 @@ public class ControllerEndpointDiscovererTests {
@Test
@Test
public
void
getEndpointsWhenNoEndpointBeansShouldReturnEmptyCollection
()
{
public
void
getEndpointsWhenNoEndpointBeansShouldReturnEmptyCollection
()
{
this
.
contextRunner
.
withUserConfiguration
(
EmptyConfiguration
.
class
)
.
run
(
this
.
contextRunner
.
withUserConfiguration
(
EmptyConfiguration
.
class
)
assertDiscoverer
((
discoverer
)
->
.
run
(
assertDiscoverer
(
assertThat
(
discoverer
.
getEndpoints
()).
isEmpty
()));
(
discoverer
)
->
assertThat
(
discoverer
.
getEndpoints
()).
isEmpty
()));
}
}
@Test
@Test
public
void
getEndpointsShouldIncludeControllerEndpoints
()
{
public
void
getEndpointsShouldIncludeControllerEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestControllerEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestControllerEndpoint
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testcontroller"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testcontroller"
);
...
@@ -79,10 +80,11 @@ public class ControllerEndpointDiscovererTests {
...
@@ -79,10 +80,11 @@ public class ControllerEndpointDiscovererTests {
@Test
@Test
public
void
getEndpointsShouldDiscoverProxyControllerEndpoints
()
{
public
void
getEndpointsShouldDiscoverProxyControllerEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestProxyControllerEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestProxyControllerEndpoint
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
.
withConfiguration
(
ValidationAutoConfiguration
.
class
))
AutoConfigurations
.
of
(
ValidationAutoConfiguration
.
class
))
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testcontroller"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testcontroller"
);
...
@@ -96,7 +98,8 @@ public class ControllerEndpointDiscovererTests {
...
@@ -96,7 +98,8 @@ public class ControllerEndpointDiscovererTests {
public
void
getEndpointsShouldIncludeRestControllerEndpoints
()
{
public
void
getEndpointsShouldIncludeRestControllerEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestRestControllerEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestRestControllerEndpoint
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testrestcontroller"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testrestcontroller"
);
...
@@ -108,10 +111,11 @@ public class ControllerEndpointDiscovererTests {
...
@@ -108,10 +111,11 @@ public class ControllerEndpointDiscovererTests {
@Test
@Test
public
void
getEndpointsShouldDiscoverProxyRestControllerEndpoints
()
{
public
void
getEndpointsShouldDiscoverProxyRestControllerEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestProxyRestControllerEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestProxyRestControllerEndpoint
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
.
withConfiguration
(
ValidationAutoConfiguration
.
class
))
AutoConfigurations
.
of
(
ValidationAutoConfiguration
.
class
))
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableControllerEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testrestcontroller"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testrestcontroller"
);
...
@@ -125,7 +129,8 @@ public class ControllerEndpointDiscovererTests {
...
@@ -125,7 +129,8 @@ public class ControllerEndpointDiscovererTests {
public
void
getEndpointsShouldNotDiscoverRegularEndpoints
()
{
public
void
getEndpointsShouldNotDiscoverRegularEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableControllerEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
List
<
String
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getId
)
List
<
String
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
assertThat
(
ids
).
containsOnly
(
"testcontroller"
,
"testrestcontroller"
);
assertThat
(
ids
).
containsOnly
(
"testcontroller"
,
"testrestcontroller"
);
...
@@ -137,7 +142,8 @@ public class ControllerEndpointDiscovererTests {
...
@@ -137,7 +142,8 @@ public class ControllerEndpointDiscovererTests {
this
.
contextRunner
.
withUserConfiguration
(
TestControllerWithOperation
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestControllerWithOperation
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
this
.
thrown
.
expect
(
IllegalStateException
.
class
);
this
.
thrown
.
expect
(
IllegalStateException
.
class
);
this
.
thrown
.
expectMessage
(
"ControllerEndpoints must not declare operations"
);
this
.
thrown
.
expectMessage
(
"ControllerEndpoints must not declare operations"
);
discoverer
.
getEndpoints
();
discoverer
.
getEndpoints
();
}));
}));
}
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/annotation/ServletEndpointDiscovererTests.java
View file @
6e09e497
...
@@ -67,15 +67,16 @@ public class ServletEndpointDiscovererTests {
...
@@ -67,15 +67,16 @@ public class ServletEndpointDiscovererTests {
@Test
@Test
public
void
getEndpointsWhenNoEndpointBeansShouldReturnEmptyCollection
()
{
public
void
getEndpointsWhenNoEndpointBeansShouldReturnEmptyCollection
()
{
this
.
contextRunner
.
withUserConfiguration
(
EmptyConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
EmptyConfiguration
.
class
)
.
run
(
assertDiscoverer
(
(
discoverer
)
.
run
(
assertDiscoverer
(
->
assertThat
(
discoverer
.
getEndpoints
()).
isEmpty
()));
(
discoverer
)
->
assertThat
(
discoverer
.
getEndpoints
()).
isEmpty
()));
}
}
@Test
@Test
public
void
getEndpointsShouldIncludeServletEndpoints
()
{
public
void
getEndpointsShouldIncludeServletEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpoint
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableServletEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableServletEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testservlet"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testservlet"
);
...
@@ -87,9 +88,11 @@ public class ServletEndpointDiscovererTests {
...
@@ -87,9 +88,11 @@ public class ServletEndpointDiscovererTests {
@Test
@Test
public
void
getEndpointsShouldDiscoverProxyServletEndpoints
()
{
public
void
getEndpointsShouldDiscoverProxyServletEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
TestProxyServletEndpoint
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestProxyServletEndpoint
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
ValidationAutoConfiguration
.
class
))
.
withConfiguration
(
AutoConfigurations
.
of
(
ValidationAutoConfiguration
.
class
))
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
assertThat
(
endpoints
).
hasSize
(
1
);
assertThat
(
endpoints
).
hasSize
(
1
);
ExposableServletEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
ExposableServletEndpoint
endpoint
=
endpoints
.
iterator
().
next
();
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testservlet"
);
assertThat
(
endpoint
.
getId
()).
isEqualTo
(
"testservlet"
);
...
@@ -102,7 +105,8 @@ public class ServletEndpointDiscovererTests {
...
@@ -102,7 +105,8 @@ public class ServletEndpointDiscovererTests {
public
void
getEndpointsShouldNotDiscoverRegularEndpoints
()
{
public
void
getEndpointsShouldNotDiscoverRegularEndpoints
()
{
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
WithRegularEndpointConfiguration
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
Collection
<
ExposableServletEndpoint
>
endpoints
=
discoverer
.
getEndpoints
();
List
<
String
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getId
)
List
<
String
>
ids
=
endpoints
.
stream
().
map
(
ExposableEndpoint:
:
getId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
assertThat
(
ids
).
containsOnly
(
"testservlet"
);
assertThat
(
ids
).
containsOnly
(
"testservlet"
);
...
@@ -114,7 +118,8 @@ public class ServletEndpointDiscovererTests {
...
@@ -114,7 +118,8 @@ public class ServletEndpointDiscovererTests {
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointWithOperation
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
TestServletEndpointWithOperation
.
class
)
.
run
(
assertDiscoverer
((
discoverer
)
->
{
.
run
(
assertDiscoverer
((
discoverer
)
->
{
this
.
thrown
.
expect
(
IllegalStateException
.
class
);
this
.
thrown
.
expect
(
IllegalStateException
.
class
);
this
.
thrown
.
expectMessage
(
"ServletEndpoints must not declare operations"
);
this
.
thrown
.
expectMessage
(
"ServletEndpoints must not declare operations"
);
discoverer
.
getEndpoints
();
discoverer
.
getEndpoints
();
}));
}));
}
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/test/ContextFactory.java
View file @
6e09e497
...
@@ -27,4 +27,5 @@ import org.springframework.context.ConfigurableApplicationContext;
...
@@ -27,4 +27,5 @@ import org.springframework.context.ConfigurableApplicationContext;
interface
ContextFactory
{
interface
ContextFactory
{
ConfigurableApplicationContext
createContext
(
List
<
Class
<?>>
configurationClasses
);
ConfigurableApplicationContext
createContext
(
List
<
Class
<?>>
configurationClasses
);
}
}
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/reactive/server/MetricsWebFilterTests.java
View file @
6e09e497
...
@@ -32,6 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
...
@@ -32,6 +32,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
/**
* Tests for {@link MetricsWebFilter}
* Tests for {@link MetricsWebFilter}
*
* @author Brian Clozel
* @author Brian Clozel
*/
*/
public
class
MetricsWebFilterTests
{
public
class
MetricsWebFilterTests
{
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/http/HttpExchangeTracerTests.java
View file @
6e09e497
...
@@ -331,4 +331,5 @@ public class HttpExchangeTracerTests {
...
@@ -331,4 +331,5 @@ public class HttpExchangeTracerTests {
}
}
return
output
.
toString
();
return
output
.
toString
();
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java
View file @
6e09e497
...
@@ -458,6 +458,7 @@ public class RabbitProperties {
...
@@ -458,6 +458,7 @@ public class RabbitProperties {
public
void
setCheckoutTimeout
(
Duration
checkoutTimeout
)
{
public
void
setCheckoutTimeout
(
Duration
checkoutTimeout
)
{
this
.
checkoutTimeout
=
checkoutTimeout
;
this
.
checkoutTimeout
=
checkoutTimeout
;
}
}
}
}
public
static
class
Connection
{
public
static
class
Connection
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.java
View file @
6e09e497
...
@@ -75,8 +75,7 @@ public class CacheAutoConfiguration {
...
@@ -75,8 +75,7 @@ public class CacheAutoConfiguration {
@Bean
@Bean
public
CacheManagerValidator
cacheAutoConfigurationValidator
(
public
CacheManagerValidator
cacheAutoConfigurationValidator
(
CacheProperties
cacheProperties
,
CacheProperties
cacheProperties
,
ObjectProvider
<
CacheManager
>
cacheManager
)
{
ObjectProvider
<
CacheManager
>
cacheManager
)
{
return
new
CacheManagerValidator
(
cacheProperties
,
cacheManager
);
return
new
CacheManagerValidator
(
cacheProperties
,
cacheManager
);
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/freemarker/FreeMarkerServletWebConfiguration.java
View file @
6e09e497
...
@@ -77,4 +77,5 @@ class FreeMarkerServletWebConfiguration extends AbstractFreeMarkerConfiguration
...
@@ -77,4 +77,5 @@ class FreeMarkerServletWebConfiguration extends AbstractFreeMarkerConfiguration
public
ResourceUrlEncodingFilter
resourceUrlEncodingFilter
()
{
public
ResourceUrlEncodingFilter
resourceUrlEncodingFilter
()
{
return
new
ResourceUrlEncodingFilter
();
return
new
ResourceUrlEncodingFilter
();
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/gson/GsonBuilderCustomizer.java
View file @
6e09e497
...
@@ -34,4 +34,5 @@ public interface GsonBuilderCustomizer {
...
@@ -34,4 +34,5 @@ public interface GsonBuilderCustomizer {
* @param gsonBuilder the GsonBuilder to customize
* @param gsonBuilder the GsonBuilder to customize
*/
*/
void
customize
(
GsonBuilder
gsonBuilder
);
void
customize
(
GsonBuilder
gsonBuilder
);
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java
View file @
6e09e497
...
@@ -62,8 +62,8 @@ class DataSourceBeanCreationFailureAnalyzer
...
@@ -62,8 +62,8 @@ class DataSourceBeanCreationFailureAnalyzer
if
(!
StringUtils
.
hasText
(
cause
.
getProperties
().
getUrl
()))
{
if
(!
StringUtils
.
hasText
(
cause
.
getProperties
().
getUrl
()))
{
description
.
append
(
"'url' attribute is not specified and "
);
description
.
append
(
"'url' attribute is not specified and "
);
}
}
description
.
append
(
description
String
.
format
(
"no embedded datasource could be configured.%n"
));
.
append
(
String
.
format
(
"no embedded datasource could be configured.%n"
));
description
.
append
(
String
.
format
(
"%nReason: %s%n"
,
cause
.
getMessage
()));
description
.
append
(
String
.
format
(
"%nReason: %s%n"
,
cause
.
getMessage
()));
return
description
.
toString
();
return
description
.
toString
();
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java
View file @
6e09e497
...
@@ -142,6 +142,7 @@ public final class StaticResourceRequest {
...
@@ -142,6 +142,7 @@ public final class StaticResourceRequest {
getDelegateMatchers
());
getDelegateMatchers
());
return
matcher
.
matches
(
exchange
);
return
matcher
.
matches
(
exchange
);
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/SessionAutoConfiguration.java
View file @
6e09e497
...
@@ -191,6 +191,7 @@ public class SessionAutoConfiguration {
...
@@ -191,6 +191,7 @@ public class SessionAutoConfiguration {
// Ignore
// Ignore
}
}
}
}
}
}
/**
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfiguration.java
View file @
6e09e497
...
@@ -75,6 +75,7 @@ public class TransactionAutoConfiguration {
...
@@ -75,6 +75,7 @@ public class TransactionAutoConfiguration {
public
TransactionTemplate
transactionTemplate
()
{
public
TransactionTemplate
transactionTemplate
()
{
return
new
TransactionTemplate
(
this
.
transactionManager
);
return
new
TransactionTemplate
(
this
.
transactionManager
);
}
}
}
}
@Configuration
@Configuration
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
6e09e497
...
@@ -957,6 +957,7 @@ public class ServerProperties {
...
@@ -957,6 +957,7 @@ public class ServerProperties {
public
void
setLogLatency
(
boolean
logLatency
)
{
public
void
setLogLatency
(
boolean
logLatency
)
{
this
.
logLatency
=
logLatency
;
this
.
logLatency
=
logLatency
;
}
}
}
}
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfiguration.java
View file @
6e09e497
...
@@ -205,6 +205,7 @@ public class WebFluxAutoConfiguration {
...
@@ -205,6 +205,7 @@ public class WebFluxAutoConfiguration {
}
}
}
}
}
}
/**
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java
View file @
6e09e497
...
@@ -752,11 +752,10 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT
...
@@ -752,11 +752,10 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT
public
void
autoConfiguredCacheManagerCanBeSwapped
()
{
public
void
autoConfiguredCacheManagerCanBeSwapped
()
{
this
.
contextRunner
this
.
contextRunner
.
withUserConfiguration
(
CacheManagerPostProcessorConfiguration
.
class
)
.
withUserConfiguration
(
CacheManagerPostProcessorConfiguration
.
class
)
.
withPropertyValues
(
"spring.cache.type=caffeine"
)
.
withPropertyValues
(
"spring.cache.type=caffeine"
).
run
((
context
)
->
{
.
run
((
context
)
->
{
getCacheManager
(
context
,
SimpleCacheManager
.
class
);
getCacheManager
(
context
,
SimpleCacheManager
.
class
);
CacheManagerPostProcessor
postProcessor
=
context
.
getBean
(
CacheManagerPostProcessor
postProcessor
=
context
CacheManagerPostProcessor
.
class
);
.
getBean
(
CacheManagerPostProcessor
.
class
);
assertThat
(
postProcessor
.
cacheManagers
).
hasSize
(
1
);
assertThat
(
postProcessor
.
cacheManagers
).
hasSize
(
1
);
assertThat
(
postProcessor
.
cacheManagers
.
get
(
0
))
assertThat
(
postProcessor
.
cacheManagers
.
get
(
0
))
.
isInstanceOf
(
CaffeineCacheManager
.
class
);
.
isInstanceOf
(
CaffeineCacheManager
.
class
);
...
@@ -1043,14 +1042,12 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT
...
@@ -1043,14 +1042,12 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT
private
final
List
<
CacheManager
>
cacheManagers
=
new
ArrayList
<>();
private
final
List
<
CacheManager
>
cacheManagers
=
new
ArrayList
<>();
@Override
@Override
public
Object
postProcessBeforeInitialization
(
Object
bean
,
public
Object
postProcessBeforeInitialization
(
Object
bean
,
String
beanName
)
{
String
beanName
)
{
return
bean
;
return
bean
;
}
}
@Override
@Override
public
Object
postProcessAfterInitialization
(
Object
bean
,
public
Object
postProcessAfterInitialization
(
Object
bean
,
String
beanName
)
{
String
beanName
)
{
if
(
bean
instanceof
CacheManager
)
{
if
(
bean
instanceof
CacheManager
)
{
this
.
cacheManagers
.
add
((
CacheManager
)
bean
);
this
.
cacheManagers
.
add
((
CacheManager
)
bean
);
return
new
SimpleCacheManager
();
return
new
SimpleCacheManager
();
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/config/second/SampleAutoConfiguration.java
View file @
6e09e497
...
@@ -36,4 +36,3 @@ public class SampleAutoConfiguration {
...
@@ -36,4 +36,3 @@ public class SampleAutoConfiguration {
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationTests.java
View file @
6e09e497
...
@@ -158,6 +158,7 @@ public class CassandraDataAutoConfigurationTests {
...
@@ -158,6 +158,7 @@ public class CassandraDataAutoConfigurationTests {
public
String
convert
(
Person
o
)
{
public
String
convert
(
Person
o
)
{
return
null
;
return
null
;
}
}
}
}
private
static
class
Person
{
private
static
class
Person
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseDataAutoConfigurationTests.java
View file @
6e09e497
...
@@ -186,6 +186,7 @@ public class CouchbaseDataAutoConfigurationTests {
...
@@ -186,6 +186,7 @@ public class CouchbaseDataAutoConfigurationTests {
public
Boolean
convert
(
CouchbaseProperties
value
)
{
public
Boolean
convert
(
CouchbaseProperties
value
)
{
return
true
;
return
true
;
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchNodeTemplate.java
View file @
6e09e497
...
@@ -76,6 +76,7 @@ public class ElasticsearchNodeTemplate {
...
@@ -76,6 +76,7 @@ public class ElasticsearchNodeTemplate {
Arrays
.
asList
(
Netty4Plugin
.
class
));
Arrays
.
asList
(
Netty4Plugin
.
class
));
new
File
(
"target/es/node/logs"
).
mkdirs
();
new
File
(
"target/es/node/logs"
).
mkdirs
();
}
}
}
}
public
final
class
ElasticsearchNode
{
public
final
class
ElasticsearchNode
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/gson/GsonAutoConfigurationTests.java
View file @
6e09e497
...
@@ -291,6 +291,7 @@ public class GsonAutoConfigurationTests {
...
@@ -291,6 +291,7 @@ public class GsonAutoConfigurationTests {
private
String
data
=
"nested"
;
private
String
data
=
"nested"
;
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/integration/IntegrationAutoConfigurationTests.java
View file @
6e09e497
...
@@ -80,16 +80,16 @@ public class IntegrationAutoConfigurationTests {
...
@@ -80,16 +80,16 @@ public class IntegrationAutoConfigurationTests {
.
withUserConfiguration
(
CustomIntegrationComponentScanConfiguration
.
class
)
.
withUserConfiguration
(
CustomIntegrationComponentScanConfiguration
.
class
)
.
run
((
context
)
->
{
.
run
((
context
)
->
{
assertThat
(
context
).
hasSingleBean
(
TestGateway
.
class
);
assertThat
(
context
).
hasSingleBean
(
TestGateway
.
class
);
assertThat
(
context
)
.
doesNotHaveBean
(
assertThat
(
context
)
IntegrationComponentScanConfiguration
.
class
);
.
doesNotHaveBean
(
IntegrationComponentScanConfiguration
.
class
);
});
});
}
}
@Test
@Test
public
void
noMBeanServerAvailable
()
{
public
void
noMBeanServerAvailable
()
{
ApplicationContextRunner
contextRunnerWithoutJmx
=
new
ApplicationContextRunner
()
ApplicationContextRunner
contextRunnerWithoutJmx
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
.
withConfiguration
(
IntegrationAutoConfiguration
.
class
));
AutoConfigurations
.
of
(
IntegrationAutoConfiguration
.
class
));
contextRunnerWithoutJmx
.
run
((
context
)
->
{
contextRunnerWithoutJmx
.
run
((
context
)
->
{
assertThat
(
context
).
hasSingleBean
(
TestGateway
.
class
);
assertThat
(
context
).
hasSingleBean
(
TestGateway
.
class
);
assertThat
(
context
)
assertThat
(
context
)
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQAutoConfigurationTests.java
View file @
6e09e497
...
@@ -232,6 +232,7 @@ public class ActiveMQAutoConfigurationTests {
...
@@ -232,6 +232,7 @@ public class ActiveMQAutoConfigurationTests {
factory
.
setUserName
(
"foobar"
);
factory
.
setUserName
(
"foobar"
);
};
};
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisEmbeddedConfigurationFactoryTests.java
View file @
6e09e497
...
@@ -96,4 +96,5 @@ public class ArtemisEmbeddedConfigurationFactoryTests {
...
@@ -96,4 +96,5 @@ public class ArtemisEmbeddedConfigurationFactoryTests {
.
getAddressConfigurations
();
.
getAddressConfigurations
();
assertThat
(
addressConfigurations
).
hasSize
(
2
);
assertThat
(
addressConfigurations
).
hasSize
(
2
);
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jsonb/JsonbAutoConfigurationTests.java
View file @
6e09e497
...
@@ -55,6 +55,7 @@ public class JsonbAutoConfigurationTests {
...
@@ -55,6 +55,7 @@ public class JsonbAutoConfigurationTests {
public
void
setData
(
String
data
)
{
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
this
.
data
=
data
;
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationTests.java
View file @
6e09e497
...
@@ -127,6 +127,7 @@ public class MustacheAutoConfigurationTests {
...
@@ -127,6 +127,7 @@ public class MustacheAutoConfigurationTests {
return
Mustache
.
compiler
().
standardsMode
(
true
)
return
Mustache
.
compiler
().
standardsMode
(
true
)
.
withLoader
(
mustacheTemplateLoader
);
.
withLoader
(
mustacheTemplateLoader
);
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/quartz/QuartzAutoConfigurationTests.java
View file @
6e09e497
...
@@ -87,21 +87,24 @@ public class QuartzAutoConfigurationTests {
...
@@ -87,21 +87,24 @@ public class QuartzAutoConfigurationTests {
@Test
@Test
public
void
withDataSourceUseMemoryByDefault
()
{
public
void
withDataSourceUseMemoryByDefault
()
{
this
.
contextRunner
.
withConfiguration
(
AutoConfigurations
.
of
(
this
.
contextRunner
DataSourceAutoConfiguration
.
class
,
.
withConfiguration
(
DataSourceTransactionManagerAutoConfiguration
.
class
)).
run
((
context
)
->
{
AutoConfigurations
.
of
(
DataSourceAutoConfiguration
.
class
,
assertThat
(
context
).
hasSingleBean
(
Scheduler
.
class
);
DataSourceTransactionManagerAutoConfiguration
.
class
))
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
.
run
((
context
)
->
{
assertThat
(
scheduler
.
getMetaData
().
getJobStoreClass
())
assertThat
(
context
).
hasSingleBean
(
Scheduler
.
class
);
.
isAssignableFrom
(
RAMJobStore
.
class
);
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
});
assertThat
(
scheduler
.
getMetaData
().
getJobStoreClass
())
.
isAssignableFrom
(
RAMJobStore
.
class
);
});
}
}
@Test
@Test
public
void
withDataSource
()
{
public
void
withDataSource
()
{
this
.
contextRunner
.
withUserConfiguration
(
QuartzJobsConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
QuartzJobsConfiguration
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
DataSourceAutoConfiguration
.
class
,
.
withConfiguration
(
DataSourceTransactionManagerAutoConfiguration
.
class
))
AutoConfigurations
.
of
(
DataSourceAutoConfiguration
.
class
,
DataSourceTransactionManagerAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.quartz.job-store-type=jdbc"
)
.
withPropertyValues
(
"spring.quartz.job-store-type=jdbc"
)
.
run
(
assertDataSourceJobStore
(
"dataSource"
));
.
run
(
assertDataSourceJobStore
(
"dataSource"
));
}
}
...
@@ -109,8 +112,8 @@ public class QuartzAutoConfigurationTests {
...
@@ -109,8 +112,8 @@ public class QuartzAutoConfigurationTests {
@Test
@Test
public
void
withDataSourceNoTransactionManager
()
{
public
void
withDataSourceNoTransactionManager
()
{
this
.
contextRunner
.
withUserConfiguration
(
QuartzJobsConfiguration
.
class
)
this
.
contextRunner
.
withUserConfiguration
(
QuartzJobsConfiguration
.
class
)
.
withConfiguration
(
AutoConfigurations
.
of
(
.
withConfiguration
(
DataSourceAutoConfiguration
.
class
))
AutoConfigurations
.
of
(
DataSourceAutoConfiguration
.
class
))
.
withPropertyValues
(
"spring.quartz.job-store-type=jdbc"
)
.
withPropertyValues
(
"spring.quartz.job-store-type=jdbc"
)
.
run
(
assertDataSourceJobStore
(
"dataSource"
));
.
run
(
assertDataSourceJobStore
(
"dataSource"
));
}
}
...
@@ -131,13 +134,13 @@ public class QuartzAutoConfigurationTests {
...
@@ -131,13 +134,13 @@ public class QuartzAutoConfigurationTests {
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
assertThat
(
scheduler
.
getMetaData
().
getJobStoreClass
())
assertThat
(
scheduler
.
getMetaData
().
getJobStoreClass
())
.
isAssignableFrom
(
LocalDataSourceJobStore
.
class
);
.
isAssignableFrom
(
LocalDataSourceJobStore
.
class
);
JdbcTemplate
jdbcTemplate
=
new
JdbcTemplate
(
context
.
getBean
(
JdbcTemplate
jdbcTemplate
=
new
JdbcTemplate
(
datasourceName
,
DataSource
.
class
));
context
.
getBean
(
datasourceName
,
DataSource
.
class
));
assertThat
(
jdbcTemplate
.
queryForObject
(
assertThat
(
jdbcTemplate
.
queryForObject
(
"SELECT COUNT(*) FROM QRTZ_JOB_DETAILS"
,
Integer
.
class
)).
isEqualTo
(
2
);
"SELECT COUNT(*) FROM QRTZ_JOB_DETAILS"
,
Integer
.
class
)).
isEqualTo
(
2
);
assertThat
(
jdbcTemplate
.
queryForObject
(
assertThat
(
jdbcTemplate
.
queryForObject
(
"SELECT COUNT(*) FROM QRTZ_SIMPLE_TRIGGERS"
,
Integer
.
class
))
"SELECT COUNT(*) FROM QRTZ_SIMPLE_TRIGGERS"
,
Integer
.
class
))
.
isEqualTo
(
0
);
.
isEqualTo
(
0
);
};
};
}
}
...
@@ -185,8 +188,9 @@ public class QuartzAutoConfigurationTests {
...
@@ -185,8 +188,9 @@ public class QuartzAutoConfigurationTests {
@Test
@Test
public
void
withQuartzProperties
()
{
public
void
withQuartzProperties
()
{
this
.
contextRunner
.
withPropertyValues
(
this
.
contextRunner
"spring.quartz.properties.org.quartz.scheduler.instanceId=FOO"
)
.
withPropertyValues
(
"spring.quartz.properties.org.quartz.scheduler.instanceId=FOO"
)
.
run
((
context
)
->
{
.
run
((
context
)
->
{
assertThat
(
context
).
hasSingleBean
(
Scheduler
.
class
);
assertThat
(
context
).
hasSingleBean
(
Scheduler
.
class
);
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
Scheduler
scheduler
=
context
.
getBean
(
Scheduler
.
class
);
...
@@ -204,8 +208,6 @@ public class QuartzAutoConfigurationTests {
...
@@ -204,8 +208,6 @@ public class QuartzAutoConfigurationTests {
});
});
}
}
@Import
(
ComponentThatUsesScheduler
.
class
)
@Import
(
ComponentThatUsesScheduler
.
class
)
@Configuration
@Configuration
protected
static
class
BaseQuartzConfiguration
{
protected
static
class
BaseQuartzConfiguration
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/WebFluxSecurityConfigurationTests.java
View file @
6e09e497
...
@@ -69,4 +69,5 @@ public class WebFluxSecurityConfigurationTests {
...
@@ -69,4 +69,5 @@ public class WebFluxSecurityConfigurationTests {
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/transaction/TransactionAutoConfigurationTests.java
View file @
6e09e497
...
@@ -203,6 +203,7 @@ public class TransactionAutoConfigurationTests {
...
@@ -203,6 +203,7 @@ public class TransactionAutoConfigurationTests {
public
AnotherServiceImpl
anotherService
()
{
public
AnotherServiceImpl
anotherService
()
{
return
new
AnotherServiceImpl
();
return
new
AnotherServiceImpl
();
}
}
}
}
@Configuration
@Configuration
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfigurationTests.java
View file @
6e09e497
...
@@ -304,6 +304,7 @@ public class ValidationAutoConfigurationTests {
...
@@ -304,6 +304,7 @@ public class ValidationAutoConfigurationTests {
interface
AnotherSampleService
{
interface
AnotherSampleService
{
void
doSomething
(
@Min
(
42
)
Integer
counter
);
void
doSomething
(
@Min
(
42
)
Integer
counter
);
}
}
@Validated
@Validated
...
@@ -313,6 +314,7 @@ public class ValidationAutoConfigurationTests {
...
@@ -313,6 +314,7 @@ public class ValidationAutoConfigurationTests {
public
void
doSomething
(
Integer
counter
)
{
public
void
doSomething
(
Integer
counter
)
{
}
}
}
}
@Configuration
@Configuration
...
@@ -382,6 +384,7 @@ public class ValidationAutoConfigurationTests {
...
@@ -382,6 +384,7 @@ public class ValidationAutoConfigurationTests {
}
}
}
}
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java
View file @
6e09e497
...
@@ -373,6 +373,7 @@ public class WebFluxAutoConfigurationTests {
...
@@ -373,6 +373,7 @@ public class WebFluxAutoConfigurationTests {
public
CodecCustomizer
firstCodecCustomizer
()
{
public
CodecCustomizer
firstCodecCustomizer
()
{
return
mock
(
CodecCustomizer
.
class
);
return
mock
(
CodecCustomizer
.
class
);
}
}
}
}
@Configuration
@Configuration
...
@@ -388,6 +389,7 @@ public class WebFluxAutoConfigurationTests {
...
@@ -388,6 +389,7 @@ public class WebFluxAutoConfigurationTests {
public
ViewResolver
anotherViewResolver
()
{
public
ViewResolver
anotherViewResolver
()
{
return
mock
(
ViewResolver
.
class
);
return
mock
(
ViewResolver
.
class
);
}
}
}
}
@Configuration
@Configuration
...
@@ -407,6 +409,7 @@ public class WebFluxAutoConfigurationTests {
...
@@ -407,6 +409,7 @@ public class WebFluxAutoConfigurationTests {
public
HttpHandler
httpHandler
()
{
public
HttpHandler
httpHandler
()
{
return
(
serverHttpRequest
,
serverHttpResponse
)
->
null
;
return
(
serverHttpRequest
,
serverHttpResponse
)
->
null
;
}
}
}
}
@Configuration
@Configuration
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java
View file @
6e09e497
...
@@ -311,6 +311,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
...
@@ -311,6 +311,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
public
String
bodyValidation
(
@Valid
@RequestBody
DummyBody
body
)
{
public
String
bodyValidation
(
@Valid
@RequestBody
DummyBody
body
)
{
return
body
.
getContent
();
return
body
.
getContent
();
}
}
}
}
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizerTests.java
View file @
6e09e497
...
@@ -109,4 +109,5 @@ public class TomcatServletWebServerFactoryCustomizerTests {
...
@@ -109,4 +109,5 @@ public class TomcatServletWebServerFactoryCustomizerTests {
this
.
customizer
.
customize
(
factory
);
this
.
customizer
.
customize
(
factory
);
return
factory
;
return
factory
;
}
}
}
}
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfigurationTests.java
View file @
6e09e497
...
@@ -829,12 +829,13 @@ public class WebMvcAutoConfigurationTests {
...
@@ -829,12 +829,13 @@ public class WebMvcAutoConfigurationTests {
@Test
@Test
public
void
contentNegotiationStrategySkipsPathExtension
()
throws
Exception
{
public
void
contentNegotiationStrategySkipsPathExtension
()
throws
Exception
{
ContentNegotiationStrategy
delegate
=
mock
(
ContentNegotiationStrategy
.
class
);
ContentNegotiationStrategy
delegate
=
mock
(
ContentNegotiationStrategy
.
class
);
ContentNegotiationStrategy
strategy
=
new
WebMvcAutoConfiguration
ContentNegotiationStrategy
strategy
=
new
WebMvcAutoConfiguration
.
OptionalPathExtensionContentNegotiationStrategy
(
.
OptionalPathExtensionContentNegotiationStrategy
(
delegate
);
delegate
);
MockHttpServletRequest
request
=
new
MockHttpServletRequest
();
MockHttpServletRequest
request
=
new
MockHttpServletRequest
();
request
.
setAttribute
(
PathExtensionContentNegotiationStrategy
.
class
request
.
setAttribute
(
.
getName
()
+
".SKIP"
,
Boolean
.
TRUE
);
PathExtensionContentNegotiationStrategy
.
class
.
getName
()
+
".SKIP"
,
Boolean
.
TRUE
);
ServletWebRequest
webRequest
=
new
ServletWebRequest
(
request
);
ServletWebRequest
webRequest
=
new
ServletWebRequest
(
request
);
List
<
MediaType
>
mediaTypes
=
strategy
.
resolveMediaTypes
(
webRequest
);
List
<
MediaType
>
mediaTypes
=
strategy
.
resolveMediaTypes
(
webRequest
);
assertThat
(
mediaTypes
).
containsOnly
(
MediaType
.
ALL
);
assertThat
(
mediaTypes
).
containsOnly
(
MediaType
.
ALL
);
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/WelcomePageHandlerMappingTests.java
View file @
6e09e497
...
@@ -68,8 +68,7 @@ public class WelcomePageHandlerMappingTests {
...
@@ -68,8 +68,7 @@ public class WelcomePageHandlerMappingTests {
.
run
((
context
)
->
{
.
run
((
context
)
->
{
WelcomePageHandlerMapping
handler
=
context
WelcomePageHandlerMapping
handler
=
context
.
getBean
(
WelcomePageHandlerMapping
.
class
);
.
getBean
(
WelcomePageHandlerMapping
.
class
);
assertThat
(
handler
.
getOrder
())
assertThat
(
handler
.
getOrder
()).
isEqualTo
(
2
);
.
isEqualTo
(
2
);
});
});
}
}
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/ProjectGenerationRequest.java
View file @
6e09e497
...
@@ -359,7 +359,8 @@ class ProjectGenerationRequest {
...
@@ -359,7 +359,8 @@ class ProjectGenerationRequest {
return
builder
.
build
();
return
builder
.
build
();
}
}
catch
(
URISyntaxException
ex
)
{
catch
(
URISyntaxException
ex
)
{
throw
new
ReportableException
(
"Invalid service URL ("
+
ex
.
getMessage
()
+
")"
);
throw
new
ReportableException
(
"Invalid service URL ("
+
ex
.
getMessage
()
+
")"
);
}
}
}
}
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/elasticsearch/jest/JestClientCustomizationExample.java
View file @
6e09e497
...
@@ -42,4 +42,5 @@ public class JestClientCustomizationExample {
...
@@ -42,4 +42,5 @@ public class JestClientCustomizationExample {
}
}
// end::customizer[]
// end::customizer[]
}
}
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/autoconfigure/UserServiceAutoConfigurationTests.java
View file @
6e09e497
...
@@ -36,6 +36,7 @@ public class UserServiceAutoConfigurationTests {
...
@@ -36,6 +36,7 @@ public class UserServiceAutoConfigurationTests {
// tag::runner[]
// tag::runner[]
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
UserServiceAutoConfiguration
.
class
));
.
withConfiguration
(
AutoConfigurations
.
of
(
UserServiceAutoConfiguration
.
class
));
// end::runner[]
// end::runner[]
// tag::test-env[]
// tag::test-env[]
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTypeExcludeFilter.java
View file @
6e09e497
...
@@ -69,4 +69,5 @@ class DataNeo4jTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter
...
@@ -69,4 +69,5 @@ class DataNeo4jTypeExcludeFilter extends AnnotationCustomizableTypeExcludeFilter
protected
Set
<
Class
<?>>
getComponentIncludes
()
{
protected
Set
<
Class
<?>>
getComponentIncludes
()
{
return
Collections
.
emptySet
();
return
Collections
.
emptySet
();
}
}
}
}
spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsTestExecutionListener.java
View file @
6e09e497
...
@@ -26,8 +26,7 @@ import org.springframework.util.ClassUtils;
...
@@ -26,8 +26,7 @@ import org.springframework.util.ClassUtils;
/**
/**
* A {@link TestExecutionListener} for Spring REST Docs that removes the need for a
* A {@link TestExecutionListener} for Spring REST Docs that removes the need for a
* {@code @Rule} when using JUnit or manual before and after test calls when using
* {@code @Rule} when using JUnit or manual before and after test calls when using TestNG.
* TestNG.
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
* @since 1.4.0
* @since 1.4.0
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/ldap/ExampleEntry.java
View file @
6e09e497
...
@@ -39,4 +39,5 @@ public class ExampleEntry {
...
@@ -39,4 +39,5 @@ public class ExampleEntry {
public
void
setDn
(
Name
dn
)
{
public
void
setDn
(
Name
dn
)
{
this
.
dn
=
dn
;
this
.
dn
=
dn
;
}
}
}
}
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/ExampleRepository.java
View file @
6e09e497
...
@@ -24,4 +24,5 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
...
@@ -24,4 +24,5 @@ import org.springframework.data.neo4j.repository.Neo4jRepository;
* @author Eddú Meléndez
* @author Eddú Meléndez
*/
*/
public
interface
ExampleRepository
extends
Neo4jRepository
<
ExampleGraph
,
Long
>
{
public
interface
ExampleRepository
extends
Neo4jRepository
<
ExampleGraph
,
Long
>
{
}
}
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/FilteredClassLoader.java
View file @
6e09e497
...
@@ -123,4 +123,5 @@ public class FilteredClassLoader extends URLClassLoader {
...
@@ -123,4 +123,5 @@ public class FilteredClassLoader extends URLClassLoader {
}
}
}
}
}
}
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/ImportsContextCustomizer.java
View file @
6e09e497
...
@@ -353,6 +353,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
...
@@ -353,6 +353,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
public
String
toString
()
{
public
String
toString
()
{
return
this
.
key
.
toString
();
return
this
.
key
.
toString
();
}
}
}
}
/**
/**
...
...
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/json/JsonbTester.java
View file @
6e09e497
...
@@ -123,6 +123,7 @@ public class JsonbTester<T> extends AbstractJsonMarshalTester<T> {
...
@@ -123,6 +123,7 @@ public class JsonbTester<T> extends AbstractJsonMarshalTester<T> {
Class
<?>
resourceLoadClass
,
ResolvableType
type
,
Jsonb
marshaller
)
{
Class
<?>
resourceLoadClass
,
ResolvableType
type
,
Jsonb
marshaller
)
{
return
new
JsonbTester
<>(
resourceLoadClass
,
type
,
marshaller
);
return
new
JsonbTester
<>(
resourceLoadClass
,
type
,
marshaller
);
}
}
}
}
}
}
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java
View file @
6e09e497
...
@@ -419,6 +419,7 @@ public class ApplicationContextAssertTests {
...
@@ -419,6 +419,7 @@ public class ApplicationContextAssertTests {
}
}
private
static
class
Foo
{
private
static
class
Foo
{
}
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestMethodConfiguration.java
View file @
6e09e497
...
@@ -30,4 +30,5 @@ public class TestMethodConfiguration {
...
@@ -30,4 +30,5 @@ public class TestMethodConfiguration {
public
Object
method
()
{
public
Object
method
()
{
return
null
;
return
null
;
}
}
}
}
spring-boot-project/spring-boot-tools/spring-boot-autoconfigure-processor/src/test/java/org/springframework/boot/autoconfigureprocessor/TestOrderedClassConfiguration.java
View file @
6e09e497
...
@@ -29,4 +29,5 @@ import java.io.OutputStream;
...
@@ -29,4 +29,5 @@ import java.io.OutputStream;
@TestConditionalOnClass
(
name
=
"java.io.InputStream"
,
value
=
OutputStream
.
class
)
@TestConditionalOnClass
(
name
=
"java.io.InputStream"
,
value
=
OutputStream
.
class
)
@TestAutoConfigureOrder
(
123
)
@TestAutoConfigureOrder
(
123
)
public
class
TestOrderedClassConfiguration
{
public
class
TestOrderedClassConfiguration
{
}
}
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata.java
View file @
6e09e497
...
@@ -151,8 +151,8 @@ public class ConfigurationMetadata {
...
@@ -151,8 +151,8 @@ public class ConfigurationMetadata {
}
}
candidates
.
removeIf
((
itemMetadata
)
->
!
itemMetadata
.
hasSameType
(
metadata
));
candidates
.
removeIf
((
itemMetadata
)
->
!
itemMetadata
.
hasSameType
(
metadata
));
if
(
candidates
.
size
()
>
1
&&
metadata
.
getType
()
!=
null
)
{
if
(
candidates
.
size
()
>
1
&&
metadata
.
getType
()
!=
null
)
{
candidates
.
removeIf
(
(
itemMetadata
)
->
candidates
.
removeIf
(
!
metadata
.
getType
().
equals
(
itemMetadata
.
getType
()));
(
itemMetadata
)
->
!
metadata
.
getType
().
equals
(
itemMetadata
.
getType
()));
}
}
if
(
candidates
.
size
()
==
1
)
{
if
(
candidates
.
size
()
==
1
)
{
return
candidates
.
get
(
0
);
return
candidates
.
get
(
0
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java
View file @
6e09e497
...
@@ -742,8 +742,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
...
@@ -742,8 +742,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
"java.lang.String"
,
null
,
null
,
null
,
null
,
null
);
"java.lang.String"
,
null
,
null
,
null
,
null
,
null
);
writeAdditionalMetadata
(
property
);
writeAdditionalMetadata
(
property
);
ConfigurationMetadata
metadata
=
compile
(
SimpleProperties
.
class
);
ConfigurationMetadata
metadata
=
compile
(
SimpleProperties
.
class
);
assertThat
(
metadata
)
.
has
(
Metadata
.
withGroup
(
"simple"
)
assertThat
(
metadata
)
.
fromSource
(
SimpleProperties
.
class
));
.
has
(
Metadata
.
withGroup
(
"simple"
).
fromSource
(
SimpleProperties
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"simple"
,
String
.
class
));
assertThat
(
metadata
).
has
(
Metadata
.
withProperty
(
"simple"
,
String
.
class
));
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/data/RandomAccessData.java
View file @
6e09e497
...
@@ -57,8 +57,10 @@ public interface RandomAccessData {
...
@@ -57,8 +57,10 @@ public interface RandomAccessData {
* @param length the number of bytes to be read
* @param length the number of bytes to be read
* @return the data
* @return the data
* @throws IOException if the data cannot be read
* @throws IOException if the data cannot be read
* @throws IndexOutOfBoundsException if offset is beyond the end of the file or subsection
* @throws IndexOutOfBoundsException if offset is beyond the end of the file or
* @throws EOFException if offset plus length is greater than the length of the file or subsection
* subsection
* @throws EOFException if offset plus length is greater than the length of the file
* or subsection
*/
*/
byte
[]
read
(
long
offset
,
long
length
)
throws
IOException
;
byte
[]
read
(
long
offset
,
long
length
)
throws
IOException
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/data/RandomAccessDataFileTests.java
View file @
6e09e497
...
@@ -110,20 +110,23 @@ public class RandomAccessDataFileTests {
...
@@ -110,20 +110,23 @@ public class RandomAccessDataFileTests {
}
}
@Test
@Test
public
void
readWhenOffsetIsBeyondEndOfSubsectionShouldThrowException
()
throws
Exception
{
public
void
readWhenOffsetIsBeyondEndOfSubsectionShouldThrowException
()
throws
Exception
{
this
.
thrown
.
expect
(
IndexOutOfBoundsException
.
class
);
this
.
thrown
.
expect
(
IndexOutOfBoundsException
.
class
);
RandomAccessData
subsection
=
this
.
file
.
getSubsection
(
0
,
10
);
RandomAccessData
subsection
=
this
.
file
.
getSubsection
(
0
,
10
);
subsection
.
read
(
11
,
0
);
subsection
.
read
(
11
,
0
);
}
}
@Test
@Test
public
void
readWhenOffsetPlusLengthGreaterThanEOFShouldThrowException
()
throws
Exception
{
public
void
readWhenOffsetPlusLengthGreaterThanEOFShouldThrowException
()
throws
Exception
{
this
.
thrown
.
expect
(
EOFException
.
class
);
this
.
thrown
.
expect
(
EOFException
.
class
);
this
.
file
.
read
(
256
,
1
);
this
.
file
.
read
(
256
,
1
);
}
}
@Test
@Test
public
void
readWhenOffsetPlusLengthGreaterThanEndOfSubsectionShouldThrowException
()
throws
Exception
{
public
void
readWhenOffsetPlusLengthGreaterThanEndOfSubsectionShouldThrowException
()
throws
Exception
{
this
.
thrown
.
expect
(
EOFException
.
class
);
this
.
thrown
.
expect
(
EOFException
.
class
);
RandomAccessData
subsection
=
this
.
file
.
getSubsection
(
0
,
10
);
RandomAccessData
subsection
=
this
.
file
.
getSubsection
(
0
,
10
);
subsection
.
read
(
10
,
1
);
subsection
.
read
(
10
,
1
);
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/jar/AsciiBytesTests.java
View file @
6e09e497
...
@@ -199,4 +199,5 @@ public class AsciiBytesTests {
...
@@ -199,4 +199,5 @@ public class AsciiBytesTests {
private
void
matchesSameAsString
(
String
input
)
{
private
void
matchesSameAsString
(
String
input
)
{
assertThat
(
new
AsciiBytes
(
input
).
matches
(
input
,
NO_SUFFIX
)).
isTrue
();
assertThat
(
new
AsciiBytes
(
input
).
matches
(
input
,
NO_SUFFIX
)).
isTrue
();
}
}
}
}
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/PropertyMapper.java
View file @
6e09e497
...
@@ -167,6 +167,7 @@ public final class PropertyMapper {
...
@@ -167,6 +167,7 @@ public final class PropertyMapper {
/**
/**
* A source that is in the process of being mapped.
* A source that is in the process of being mapped.
*
* @param <T> the source type
* @param <T> the source type
*/
*/
public
static
final
class
Source
<
T
>
{
public
static
final
class
Source
<
T
>
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/AggregateBinder.java
View file @
6e09e497
...
@@ -91,6 +91,7 @@ abstract class AggregateBinder<T> {
...
@@ -91,6 +91,7 @@ abstract class AggregateBinder<T> {
/**
/**
* Internal class used to supply the aggregate and cache the value.
* Internal class used to supply the aggregate and cache the value.
*
* @param <T> The aggregate type
* @param <T> The aggregate type
*/
*/
protected
static
class
AggregateSupplier
<
T
>
{
protected
static
class
AggregateSupplier
<
T
>
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/origin/SystemEnvironmentOrigin.java
View file @
6e09e497
...
@@ -61,4 +61,5 @@ public class SystemEnvironmentOrigin implements Origin {
...
@@ -61,4 +61,5 @@ public class SystemEnvironmentOrigin implements Origin {
SystemEnvironmentOrigin
other
=
(
SystemEnvironmentOrigin
)
obj
;
SystemEnvironmentOrigin
other
=
(
SystemEnvironmentOrigin
)
obj
;
return
ObjectUtils
.
nullSafeEquals
(
this
.
property
,
other
.
property
);
return
ObjectUtils
.
nullSafeEquals
(
this
.
property
,
other
.
property
);
}
}
}
}
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java
View file @
6e09e497
...
@@ -367,6 +367,7 @@ public final class LambdaSafe {
...
@@ -367,6 +367,7 @@ public final class LambdaSafe {
* The result of a callback which may be a value, {@code null} or absent entirely if
* The result of a callback which may be a value, {@code null} or absent entirely if
* the callback wasn't suitable. Similar in design to {@link Optional} but allows for
* the callback wasn't suitable. Similar in design to {@link Optional} but allows for
* {@code null} as a valid value.
* {@code null} as a valid value.
*
* @param <R> The result type
* @param <R> The result type
*/
*/
public
static
final
class
InvocationResult
<
R
>
{
public
static
final
class
InvocationResult
<
R
>
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizer.java
View file @
6e09e497
...
@@ -114,7 +114,8 @@ class SslConnectorCustomizer implements TomcatConnectorCustomizer {
...
@@ -114,7 +114,8 @@ class SslConnectorCustomizer implements TomcatConnectorCustomizer {
try
{
try
{
if
(
sslStoreProvider
.
getKeyStore
()
!=
null
)
{
if
(
sslStoreProvider
.
getKeyStore
()
!=
null
)
{
protocol
.
setKeystorePass
(
""
);
protocol
.
setKeystorePass
(
""
);
protocol
.
setKeystoreFile
(
SslStoreProviderUrlStreamHandlerFactory
.
KEY_STORE_URL
);
protocol
.
setKeystoreFile
(
SslStoreProviderUrlStreamHandlerFactory
.
KEY_STORE_URL
);
}
}
if
(
sslStoreProvider
.
getTrustStore
()
!=
null
)
{
if
(
sslStoreProvider
.
getTrustStore
()
!=
null
)
{
protocol
.
setTruststoreFile
(
protocol
.
setTruststoreFile
(
...
@@ -122,8 +123,7 @@ class SslConnectorCustomizer implements TomcatConnectorCustomizer {
...
@@ -122,8 +123,7 @@ class SslConnectorCustomizer implements TomcatConnectorCustomizer {
}
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
throw
new
WebServerException
(
"Could not load store: "
+
ex
.
getMessage
(),
throw
new
WebServerException
(
"Could not load store: "
+
ex
.
getMessage
(),
ex
);
ex
);
}
}
}
}
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowCompressionConfigurer.java
View file @
6e09e497
...
@@ -126,4 +126,5 @@ final class UndertowCompressionConfigurer {
...
@@ -126,4 +126,5 @@ final class UndertowCompressionConfigurer {
}
}
}
}
}
}
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactory.java
View file @
6e09e497
...
@@ -582,6 +582,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
...
@@ -582,6 +582,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
return
null
;
return
null
;
}
}
}
}
}
}
/**
/**
...
@@ -603,6 +604,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
...
@@ -603,6 +604,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
initializer
.
onStartup
(
servletContext
);
initializer
.
onStartup
(
servletContext
);
}
}
}
}
}
}
private
static
final
class
LoaderHidingResourceManager
implements
ResourceManager
{
private
static
final
class
LoaderHidingResourceManager
implements
ResourceManager
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/ServletRegistrationBean.java
View file @
6e09e497
...
@@ -214,4 +214,5 @@ public class ServletRegistrationBean<T extends Servlet>
...
@@ -214,4 +214,5 @@ public class ServletRegistrationBean<T extends Servlet>
public
String
getServletName
()
{
public
String
getServletName
()
{
return
getOrDeduceName
(
this
.
servlet
);
return
getOrDeduceName
(
this
.
servlet
);
}
}
}
}
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactory.java
View file @
6e09e497
...
@@ -284,7 +284,6 @@ public abstract class AbstractServletWebServerFactory
...
@@ -284,7 +284,6 @@ public abstract class AbstractServletWebServerFactory
/**
/**
* Converts the given {@code url} into a decoded file path.
* Converts the given {@code url} into a decoded file path.
*
* @param url the url to convert
* @param url the url to convert
* @return the file path
* @return the file path
* @deprecated Since 2.0.2 in favor of {@link File#File(java.net.URI)}
* @deprecated Since 2.0.2 in favor of {@link File#File(java.net.URI)}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java
View file @
6e09e497
...
@@ -758,8 +758,8 @@ public class ConfigFileApplicationListenerTests {
...
@@ -758,8 +758,8 @@ public class ConfigFileApplicationListenerTests {
assertThat
(
environment
).
has
(
matchingProfile
(
"morespecific"
));
assertThat
(
environment
).
has
(
matchingProfile
(
"morespecific"
));
assertThat
(
environment
).
has
(
matchingProfile
(
"yetmorespecific"
));
assertThat
(
environment
).
has
(
matchingProfile
(
"yetmorespecific"
));
assertThat
(
environment
).
doesNotHave
(
matchingProfile
(
"missing"
));
assertThat
(
environment
).
doesNotHave
(
matchingProfile
(
"missing"
));
assertThat
(
this
.
out
.
toString
())
assertThat
(
this
.
out
.
toString
())
.
contains
(
.
contains
(
"The following profiles are active: includeprofile,specific,morespecific,yetmorespecific"
);
"The following profiles are active: includeprofile,specific,morespecific,yetmorespecific"
);
}
}
@Test
@Test
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java
View file @
6e09e497
...
@@ -831,6 +831,7 @@ public class ConfigurationPropertiesTests {
...
@@ -831,6 +831,7 @@ public class ConfigurationPropertiesTests {
public
NonValidatedJsr303Properties
properties
()
{
public
NonValidatedJsr303Properties
properties
()
{
return
new
NonValidatedJsr303Properties
();
return
new
NonValidatedJsr303Properties
();
}
}
}
}
@Configuration
@Configuration
...
@@ -1374,6 +1375,7 @@ public class ConfigurationPropertiesTests {
...
@@ -1374,6 +1375,7 @@ public class ConfigurationPropertiesTests {
interface
InterfaceForValidatedImplementation
{
interface
InterfaceForValidatedImplementation
{
String
getFoo
();
String
getFoo
();
}
}
@ConfigurationProperties
(
"test"
)
@ConfigurationProperties
(
"test"
)
...
@@ -1687,6 +1689,7 @@ public class ConfigurationPropertiesTests {
...
@@ -1687,6 +1689,7 @@ public class ConfigurationPropertiesTests {
String
[]
content
=
StringUtils
.
split
(
source
,
" "
);
String
[]
content
=
StringUtils
.
split
(
source
,
" "
);
return
new
Person
(
content
[
0
],
content
[
1
]);
return
new
Person
(
content
[
0
],
content
[
1
]);
}
}
}
}
static
class
GenericPersonConverter
implements
GenericConverter
{
static
class
GenericPersonConverter
implements
GenericConverter
{
...
@@ -1704,6 +1707,7 @@ public class ConfigurationPropertiesTests {
...
@@ -1704,6 +1707,7 @@ public class ConfigurationPropertiesTests {
String
[]
content
=
StringUtils
.
split
((
String
)
source
,
" "
);
String
[]
content
=
StringUtils
.
split
((
String
)
source
,
" "
);
return
new
Person
(
content
[
0
],
content
[
1
]);
return
new
Person
(
content
[
0
],
content
[
1
]);
}
}
}
}
static
class
PersonPropertyEditor
extends
PropertyEditorSupport
{
static
class
PersonPropertyEditor
extends
PropertyEditorSupport
{
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BackCompatibilityBinderIntegrationTests.java
View file @
6e09e497
...
@@ -85,4 +85,5 @@ public class BackCompatibilityBinderIntegrationTests {
...
@@ -85,4 +85,5 @@ public class BackCompatibilityBinderIntegrationTests {
}
}
}
}
}
}
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/CollectionBinderTests.java
View file @
6e09e497
...
@@ -425,6 +425,7 @@ public class CollectionBinderTests {
...
@@ -425,6 +425,7 @@ public class CollectionBinderTests {
public
void
setItemsSet
(
Set
<
String
>
itemsSet
)
{
public
void
setItemsSet
(
Set
<
String
>
itemsSet
)
{
this
.
itemsSet
=
itemsSet
;
this
.
itemsSet
=
itemsSet
;
}
}
}
}
public
static
class
ExampleCustomNoDefaultConstructorBean
{
public
static
class
ExampleCustomNoDefaultConstructorBean
{
...
@@ -490,6 +491,7 @@ public class CollectionBinderTests {
...
@@ -490,6 +491,7 @@ public class CollectionBinderTests {
public
void
setValue
(
String
value
)
{
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
this
.
value
=
value
;
}
}
}
}
public
static
class
ClonedArrayBean
{
public
static
class
ClonedArrayBean
{
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindFailureAnalyzerTests.java
View file @
6e09e497
...
@@ -168,6 +168,7 @@ public class BindFailureAnalyzerTests {
...
@@ -168,6 +168,7 @@ public class BindFailureAnalyzerTests {
public
void
setListValue
(
List
<
String
>
listValue
)
{
public
void
setListValue
(
List
<
String
>
listValue
)
{
this
.
listValue
=
listValue
;
this
.
listValue
=
listValue
;
}
}
}
}
@ConfigurationProperties
(
"test.foo"
)
@ConfigurationProperties
(
"test.foo"
)
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BindValidationFailureAnalyzerTests.java
View file @
6e09e497
...
@@ -221,4 +221,5 @@ public class BindValidationFailureAnalyzerTests {
...
@@ -221,4 +221,5 @@ public class BindValidationFailureAnalyzerTests {
}
}
}
}
}
}
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/SpringApplicationJsonEnvironmentPostProcessorTests.java
View file @
6e09e497
...
@@ -135,4 +135,5 @@ public class SpringApplicationJsonEnvironmentPostProcessorTests {
...
@@ -135,4 +135,5 @@ public class SpringApplicationJsonEnvironmentPostProcessorTests {
assertThat
(
origin
.
getPropertyName
()).
isEqualTo
(
"spring.application.json"
);
assertThat
(
origin
.
getPropertyName
()).
isEqualTo
(
"spring.application.json"
);
assertThat
(
this
.
environment
.
resolvePlaceholders
(
"${foo:}"
)).
isEqualTo
(
"bar"
);
assertThat
(
this
.
environment
.
resolvePlaceholders
(
"${foo:}"
)).
isEqualTo
(
"bar"
);
}
}
}
}
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/origin/SystemEnvironmentOriginTests.java
View file @
6e09e497
...
@@ -56,4 +56,5 @@ public class SystemEnvironmentOriginTests {
...
@@ -56,4 +56,5 @@ public class SystemEnvironmentOriginTests {
assertThat
(
origin
.
toString
())
assertThat
(
origin
.
toString
())
.
isEqualTo
(
"System Environment Property \"FOO_BAR\""
);
.
isEqualTo
(
"System Environment Property \"FOO_BAR\""
);
}
}
}
}
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/SslConnectorCustomizerTests.java
View file @
6e09e497
...
@@ -64,7 +64,8 @@ public class SslConnectorCustomizerTests {
...
@@ -64,7 +64,8 @@ public class SslConnectorCustomizerTests {
@After
@After
public
void
stop
()
throws
Exception
{
public
void
stop
()
throws
Exception
{
ReflectionTestUtils
.
setField
(
TomcatURLStreamHandlerFactory
.
class
,
"instance"
,
null
);
ReflectionTestUtils
.
setField
(
TomcatURLStreamHandlerFactory
.
class
,
"instance"
,
null
);
ReflectionTestUtils
.
setField
(
URL
.
class
,
"factory"
,
null
);
ReflectionTestUtils
.
setField
(
URL
.
class
,
"factory"
,
null
);
this
.
tomcat
.
stop
();
this
.
tomcat
.
stop
();
}
}
...
@@ -120,50 +121,60 @@ public class SslConnectorCustomizerTests {
...
@@ -120,50 +121,60 @@ public class SslConnectorCustomizerTests {
}
}
@Test
@Test
public
void
customizeWhenSslStoreProviderProvidesOnlyKeyStoreShouldUseDefaultTruststore
()
throws
Exception
{
public
void
customizeWhenSslStoreProviderProvidesOnlyKeyStoreShouldUseDefaultTruststore
()
throws
Exception
{
Ssl
ssl
=
new
Ssl
();
Ssl
ssl
=
new
Ssl
();
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setTrustStore
(
"src/test/resources/test.jks"
);
ssl
.
setTrustStore
(
"src/test/resources/test.jks"
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
given
(
sslStoreProvider
.
getKeyStore
()).
willReturn
(
loadStore
());
given
(
sslStoreProvider
.
getKeyStore
()).
willReturn
(
loadStore
());
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
Connector
connector
=
this
.
tomcat
.
getConnector
();
Connector
connector
=
this
.
tomcat
.
getConnector
();
customizer
.
customize
(
connector
);
customizer
.
customize
(
connector
);
this
.
tomcat
.
start
();
this
.
tomcat
.
start
();
SSLHostConfig
sslHostConfig
=
connector
.
getProtocolHandler
()
SSLHostConfig
sslHostConfig
=
connector
.
getProtocolHandler
()
.
findSslHostConfigs
()[
0
];
.
findSslHostConfigs
()[
0
];
SSLHostConfig
sslHostConfigWithDefaults
=
new
SSLHostConfig
();
SSLHostConfig
sslHostConfigWithDefaults
=
new
SSLHostConfig
();
assertThat
(
sslHostConfig
.
getTruststoreFile
()).
isEqualTo
(
sslHostConfigWithDefaults
.
getTruststoreFile
());
assertThat
(
sslHostConfig
.
getTruststoreFile
())
assertThat
(
sslHostConfig
.
getCertificateKeystoreFile
()).
isEqualTo
(
SslStoreProviderUrlStreamHandlerFactory
.
KEY_STORE_URL
);
.
isEqualTo
(
sslHostConfigWithDefaults
.
getTruststoreFile
());
assertThat
(
sslHostConfig
.
getCertificateKeystoreFile
())
.
isEqualTo
(
SslStoreProviderUrlStreamHandlerFactory
.
KEY_STORE_URL
);
}
}
@Test
@Test
public
void
customizeWhenSslStoreProviderProvidesOnlyTrustStoreShouldUseDefaultKeystore
()
throws
Exception
{
public
void
customizeWhenSslStoreProviderProvidesOnlyTrustStoreShouldUseDefaultKeystore
()
throws
Exception
{
Ssl
ssl
=
new
Ssl
();
Ssl
ssl
=
new
Ssl
();
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setKeyStore
(
"src/test/resources/test.jks"
);
ssl
.
setKeyStore
(
"src/test/resources/test.jks"
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
given
(
sslStoreProvider
.
getTrustStore
()).
willReturn
(
loadStore
());
given
(
sslStoreProvider
.
getTrustStore
()).
willReturn
(
loadStore
());
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
Connector
connector
=
this
.
tomcat
.
getConnector
();
Connector
connector
=
this
.
tomcat
.
getConnector
();
customizer
.
customize
(
connector
);
customizer
.
customize
(
connector
);
this
.
tomcat
.
start
();
this
.
tomcat
.
start
();
SSLHostConfig
sslHostConfig
=
connector
.
getProtocolHandler
()
SSLHostConfig
sslHostConfig
=
connector
.
getProtocolHandler
()
.
findSslHostConfigs
()[
0
];
.
findSslHostConfigs
()[
0
];
SSLHostConfig
sslHostConfigWithDefaults
=
new
SSLHostConfig
();
SSLHostConfig
sslHostConfigWithDefaults
=
new
SSLHostConfig
();
assertThat
(
sslHostConfig
.
getTruststoreFile
()).
isEqualTo
(
SslStoreProviderUrlStreamHandlerFactory
.
TRUST_STORE_URL
);
assertThat
(
sslHostConfig
.
getTruststoreFile
())
assertThat
(
sslHostConfig
.
getCertificateKeystoreFile
()).
contains
(
sslHostConfigWithDefaults
.
getCertificateKeystoreFile
());
.
isEqualTo
(
SslStoreProviderUrlStreamHandlerFactory
.
TRUST_STORE_URL
);
assertThat
(
sslHostConfig
.
getCertificateKeystoreFile
())
.
contains
(
sslHostConfigWithDefaults
.
getCertificateKeystoreFile
());
}
}
@Test
@Test
public
void
customizeWhenSslStoreProviderPresentShouldIgnorePasswordFromSsl
()
throws
Exception
{
public
void
customizeWhenSslStoreProviderPresentShouldIgnorePasswordFromSsl
()
throws
Exception
{
Ssl
ssl
=
new
Ssl
();
Ssl
ssl
=
new
Ssl
();
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setKeyPassword
(
"password"
);
ssl
.
setKeyStorePassword
(
"secret"
);
ssl
.
setKeyStorePassword
(
"secret"
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
SslStoreProvider
sslStoreProvider
=
mock
(
SslStoreProvider
.
class
);
given
(
sslStoreProvider
.
getTrustStore
()).
willReturn
(
loadStore
());
given
(
sslStoreProvider
.
getTrustStore
()).
willReturn
(
loadStore
());
given
(
sslStoreProvider
.
getKeyStore
()).
willReturn
(
loadStore
());
given
(
sslStoreProvider
.
getKeyStore
()).
willReturn
(
loadStore
());
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
SslConnectorCustomizer
customizer
=
new
SslConnectorCustomizer
(
ssl
,
sslStoreProvider
);
Connector
connector
=
this
.
tomcat
.
getConnector
();
Connector
connector
=
this
.
tomcat
.
getConnector
();
customizer
.
customize
(
connector
);
customizer
.
customize
(
connector
);
this
.
tomcat
.
start
();
this
.
tomcat
.
start
();
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/undertow/UndertowServletWebServerFactoryTests.java
View file @
6e09e497
...
@@ -221,8 +221,8 @@ public class UndertowServletWebServerFactoryTests
...
@@ -221,8 +221,8 @@ public class UndertowServletWebServerFactoryTests
@Test
@Test
public
void
sslRestrictedProtocolsECDHETLS1Failure
()
throws
Exception
{
public
void
sslRestrictedProtocolsECDHETLS1Failure
()
throws
Exception
{
this
.
thrown
.
expect
(
anyOf
(
instanceOf
(
SSLException
.
class
),
this
.
thrown
.
expect
(
instanceOf
(
SocketException
.
class
)));
anyOf
(
instanceOf
(
SSLException
.
class
),
instanceOf
(
SocketException
.
class
)));
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1"
},
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1"
},
new
String
[]
{
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
});
new
String
[]
{
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
});
}
}
...
@@ -241,8 +241,8 @@ public class UndertowServletWebServerFactoryTests
...
@@ -241,8 +241,8 @@ public class UndertowServletWebServerFactoryTests
@Test
@Test
public
void
sslRestrictedProtocolsRSATLS11Failure
()
throws
Exception
{
public
void
sslRestrictedProtocolsRSATLS11Failure
()
throws
Exception
{
this
.
thrown
.
expect
(
anyOf
(
instanceOf
(
SSLException
.
class
),
this
.
thrown
.
expect
(
instanceOf
(
SocketException
.
class
)));
anyOf
(
instanceOf
(
SSLException
.
class
),
instanceOf
(
SocketException
.
class
)));
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1.1"
},
testRestrictedSSLProtocolsAndCipherSuites
(
new
String
[]
{
"TLSv1.1"
},
new
String
[]
{
"TLS_RSA_WITH_AES_128_CBC_SHA256"
});
new
String
[]
{
"TLS_RSA_WITH_AES_128_CBC_SHA256"
});
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java
View file @
6e09e497
...
@@ -866,8 +866,8 @@ public abstract class AbstractServletWebServerFactoryTests {
...
@@ -866,8 +866,8 @@ public abstract class AbstractServletWebServerFactoryTests {
this
.
webServer
=
factory
.
getWebServer
();
this
.
webServer
=
factory
.
getWebServer
();
Map
<
String
,
String
>
configuredMimeMappings
=
getActualMimeMappings
();
Map
<
String
,
String
>
configuredMimeMappings
=
getActualMimeMappings
();
Collection
<
MimeMappings
.
Mapping
>
expectedMimeMappings
=
getExpectedMimeMappings
();
Collection
<
MimeMappings
.
Mapping
>
expectedMimeMappings
=
getExpectedMimeMappings
();
configuredMimeMappings
.
forEach
((
key
,
value
)
->
assertThat
(
expectedMimeMappings
)
.
configuredMimeMappings
.
forEach
((
key
,
value
)
->
assertThat
(
expectedMimeMappings
)
contains
(
new
MimeMappings
.
Mapping
(
key
,
value
)));
.
contains
(
new
MimeMappings
.
Mapping
(
key
,
value
)));
for
(
MimeMappings
.
Mapping
mapping
:
expectedMimeMappings
)
{
for
(
MimeMappings
.
Mapping
mapping
:
expectedMimeMappings
)
{
assertThat
(
configuredMimeMappings
).
containsEntry
(
mapping
.
getExtension
(),
assertThat
(
configuredMimeMappings
).
containsEntry
(
mapping
.
getExtension
(),
mapping
.
getMimeType
());
mapping
.
getMimeType
());
...
...
spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java
View file @
6e09e497
...
@@ -104,10 +104,10 @@ class ApplicationBuilder {
...
@@ -104,10 +104,10 @@ class ApplicationBuilder {
context
.
put
(
"bootVersion"
,
Versions
.
getBootVersion
());
context
.
put
(
"bootVersion"
,
Versions
.
getBootVersion
());
context
.
put
(
"resourcesJarPath"
,
resourcesJar
.
getAbsolutePath
());
context
.
put
(
"resourcesJarPath"
,
resourcesJar
.
getAbsolutePath
());
try
(
FileWriter
out
=
new
FileWriter
(
new
File
(
appFolder
,
"pom.xml"
));
try
(
FileWriter
out
=
new
FileWriter
(
new
File
(
appFolder
,
"pom.xml"
));
FileReader
templateReader
=
new
FileReader
(
"src/test/resources/pom-template.xml"
))
{
FileReader
templateReader
=
new
FileReader
(
Mustache
.
compiler
().
escapeHTML
(
false
)
"src/test/resources/pom-template.xml"
))
{
.
compile
(
templateReader
)
Mustache
.
compiler
().
escapeHTML
(
false
).
compile
(
templateReader
).
execute
(
context
,
.
execute
(
context
,
out
);
out
);
}
}
}
}
...
@@ -120,10 +120,10 @@ class ApplicationBuilder {
...
@@ -120,10 +120,10 @@ class ApplicationBuilder {
context
.
put
(
"repository"
,
repository
);
context
.
put
(
"repository"
,
repository
);
File
settingsXml
=
new
File
(
appFolder
,
"settings.xml"
);
File
settingsXml
=
new
File
(
appFolder
,
"settings.xml"
);
try
(
FileWriter
out
=
new
FileWriter
(
settingsXml
);
try
(
FileWriter
out
=
new
FileWriter
(
settingsXml
);
FileReader
templateReader
=
new
FileReader
(
"src/test/resources/settings-template.xml"
))
{
FileReader
templateReader
=
new
FileReader
(
Mustache
.
compiler
().
escapeHTML
(
false
)
"src/test/resources/settings-template.xml"
))
{
.
compile
(
templateReader
)
Mustache
.
compiler
().
escapeHTML
(
false
).
compile
(
templateReader
).
execute
(
context
,
.
execute
(
context
,
out
);
out
);
}
}
return
settingsXml
;
return
settingsXml
;
}
}
...
...
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