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
5de46c31
Commit
5de46c31
authored
Feb 09, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
a0f40713
Changes
60
Hide whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
131 additions
and
113 deletions
+131
-113
KafkaHealthIndicatorAutoConfiguration.java
...onfigure/kafka/KafkaHealthIndicatorAutoConfiguration.java
+2
-1
MeterRegistryConfigurer.java
...ctuate/autoconfigure/metrics/MeterRegistryConfigurer.java
+2
-2
AtlasProperties.java
...e/autoconfigure/metrics/export/atlas/AtlasProperties.java
+1
-1
AtlasPropertiesConfigAdapter.java
...re/metrics/export/atlas/AtlasPropertiesConfigAdapter.java
+1
-1
GangliaPropertiesConfigAdapter.java
...etrics/export/ganglia/GangliaPropertiesConfigAdapter.java
+1
-1
PrometheusPropertiesConfigAdapter.java
.../export/prometheus/PrometheusPropertiesConfigAdapter.java
+1
-1
PropertiesConfigAdapter.java
...re/metrics/export/properties/PropertiesConfigAdapter.java
+1
-1
StepRegistryProperties.java
...ure/metrics/export/properties/StepRegistryProperties.java
+1
-1
StepRegistryPropertiesConfigAdapter.java
...xport/properties/StepRegistryPropertiesConfigAdapter.java
+1
-1
SimplePropertiesConfigAdapter.java
.../metrics/export/simple/SimplePropertiesConfigAdapter.java
+1
-1
StatsdPropertiesConfigAdapter.java
.../metrics/export/statsd/StatsdPropertiesConfigAdapter.java
+1
-1
KafkaHealthIndicatorAutoConfigurationTests.java
...ure/kafka/KafkaHealthIndicatorAutoConfigurationTests.java
+1
-0
KafkaHealthIndicator.java
...ingframework/boot/actuate/kafka/KafkaHealthIndicator.java
+1
-0
WebMvcMetricsFilter.java
...boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java
+4
-5
JerseyWebEndpointIntegrationTests.java
...ndpoint/web/jersey/JerseyWebEndpointIntegrationTests.java
+18
-13
WebFluxEndpointIntegrationTests.java
...ndpoint/web/reactive/WebFluxEndpointIntegrationTests.java
+23
-13
MvcWebEndpointIntegrationTests.java
.../endpoint/web/servlet/MvcWebEndpointIntegrationTests.java
+18
-13
ReactiveSecurityAutoConfiguration.java
.../security/reactive/ReactiveSecurityAutoConfiguration.java
+1
-1
ReactiveUserDetailsServiceAutoConfiguration.java
...reactive/ReactiveUserDetailsServiceAutoConfiguration.java
+1
-1
ReactiveSecurityAutoConfigurationTests.java
...rity/reactive/ReactiveSecurityAutoConfigurationTests.java
+1
-1
spring-boot-features.adoc
...ing-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+2
-0
ExitCodeApplication.java
...va/org/springframework/boot/docs/ExitCodeApplication.java
+1
-1
UserService.java
.../springframework/boot/docs/autoconfigure/UserService.java
+1
-1
SpringApplicationBuilderExample.java
...rk/boot/docs/builder/SpringApplicationBuilderExample.java
+1
-1
CloudFoundryIgnorePathsExample.java
...oot/docs/cloudfoundry/CloudFoundryIgnorePathsExample.java
+1
-1
EnvironmentPostProcessorExample.java
...rk/boot/docs/context/EnvironmentPostProcessorExample.java
+1
-1
HibernateSearchElasticsearchExample.java
...cs/elasticsearch/HibernateSearchElasticsearchExample.java
+1
-1
JestClientCustomizationExample.java
...cs/elasticsearch/jest/JestClientCustomizationExample.java
+1
-1
BasicDataSourceExample.java
...pringframework/boot/docs/jdbc/BasicDataSourceExample.java
+1
-1
CompleteTwoDataSourcesExample.java
...amework/boot/docs/jdbc/CompleteTwoDataSourcesExample.java
+1
-1
ConfigurableDataSourceExample.java
...amework/boot/docs/jdbc/ConfigurableDataSourceExample.java
+1
-1
SimpleDataSourceExample.java
...ringframework/boot/docs/jdbc/SimpleDataSourceExample.java
+1
-1
SimpleTwoDataSourcesExample.java
...framework/boot/docs/jdbc/SimpleTwoDataSourcesExample.java
+1
-1
AdvancedConfigurationExample.java
...re/restdocs/restassured/AdvancedConfigurationExample.java
+1
-1
UserDocumentationTests.java
...onfigure/restdocs/restassured/UserDocumentationTests.java
+1
-1
SpockTestRestTemplateExample.java
...rk/boot/docs/test/spock/SpockTestRestTemplateExample.java
+1
-1
UnauthenticatedAccessExample.java
.../boot/docs/web/security/UnauthenticatedAccessExample.java
+1
-1
SpringApplicationBuilderExampleTests.java
...ot/docs/builder/SpringApplicationBuilderExampleTests.java
+1
-1
EnvironmentPostProcessorExampleTests.java
...ot/docs/context/EnvironmentPostProcessorExampleTests.java
+1
-1
TomcatLegacyCookieProcessorExampleTests.java
...ext/embedded/TomcatLegacyCookieProcessorExampleTests.java
+1
-1
BasicDataSourceExampleTests.java
...framework/boot/docs/jdbc/BasicDataSourceExampleTests.java
+1
-1
CompleteTwoDataSourcesExampleTests.java
...rk/boot/docs/jdbc/CompleteTwoDataSourcesExampleTests.java
+1
-1
ConfigurableDataSourceExampleTests.java
...rk/boot/docs/jdbc/ConfigurableDataSourceExampleTests.java
+1
-1
SampleApp.java
...st/java/org/springframework/boot/docs/jdbc/SampleApp.java
+1
-1
SimpleDataSourceExampleTests.java
...ramework/boot/docs/jdbc/SimpleDataSourceExampleTests.java
+1
-1
SpockTestRestTemplateExampleTests.java
...ot/docs/test/spock/SpockTestRestTemplateExampleTests.java
+1
-1
ConfigurationBeanFactoryMetadata.java
.../context/properties/ConfigurationBeanFactoryMetadata.java
+1
-1
ConfigurationPropertiesBindingPostProcessorRegistrar.java
...ConfigurationPropertiesBindingPostProcessorRegistrar.java
+1
-1
JavaBeanBinder.java
...ramework/boot/context/properties/bind/JavaBeanBinder.java
+7
-9
ApplicationHome.java
...java/org/springframework/boot/system/ApplicationHome.java
+1
-2
BinderTests.java
...ngframework/boot/context/properties/bind/BinderTests.java
+1
-0
ManagementPortSampleActuatorApplicationTests.java
...ctuator/ManagementPortSampleActuatorApplicationTests.java
+1
-1
pom.xml
spring-boot-samples/spring-boot-sample-kafka/pom.xml
+1
-4
Consumer.java
...oot-sample-kafka/src/main/java/sample/kafka/Consumer.java
+2
-1
Producer.java
...oot-sample-kafka/src/main/java/sample/kafka/Producer.java
+2
-1
SampleKafkaApplication.java
...ka/src/main/java/sample/kafka/SampleKafkaApplication.java
+1
-1
SampleMessage.java
...ample-kafka/src/main/java/sample/kafka/SampleMessage.java
+1
-5
SampleKafkaApplicationTests.java
...c/test/java/sample/kafka/SampleKafkaApplicationTests.java
+2
-1
SampleSecureWebFluxApplicationTests.java
...e/secure/webflux/SampleSecureWebFluxApplicationTests.java
+1
-1
UserVehicleControllerTests.java
...test/java/sample/test/web/UserVehicleControllerTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/kafka/KafkaHealthIndicatorAutoConfiguration.java
View file @
5de46c31
...
@@ -40,6 +40,7 @@ import org.springframework.kafka.core.KafkaAdmin;
...
@@ -40,6 +40,7 @@ import org.springframework.kafka.core.KafkaAdmin;
* {@link EnableAutoConfiguration Auto-configuration} for {@link KafkaHealthIndicator}.
* {@link EnableAutoConfiguration Auto-configuration} for {@link KafkaHealthIndicator}.
*
*
* @author Juan Rada
* @author Juan Rada
* @since 2.0.0
*/
*/
@Configuration
@Configuration
@ConditionalOnClass
(
KafkaAdmin
.
class
)
@ConditionalOnClass
(
KafkaAdmin
.
class
)
...
@@ -55,7 +56,7 @@ public class KafkaHealthIndicatorAutoConfiguration
...
@@ -55,7 +56,7 @@ public class KafkaHealthIndicatorAutoConfiguration
private
final
KafkaHealthIndicatorProperties
properties
;
private
final
KafkaHealthIndicatorProperties
properties
;
KafkaHealthIndicatorAutoConfiguration
(
Map
<
String
,
KafkaAdmin
>
admins
,
public
KafkaHealthIndicatorAutoConfiguration
(
Map
<
String
,
KafkaAdmin
>
admins
,
KafkaHealthIndicatorProperties
properties
)
{
KafkaHealthIndicatorProperties
properties
)
{
this
.
admins
=
admins
;
this
.
admins
=
admins
;
this
.
properties
=
properties
;
this
.
properties
=
properties
;
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/MeterRegistryConfigurer.java
View file @
5de46c31
...
@@ -62,8 +62,8 @@ class MeterRegistryConfigurer {
...
@@ -62,8 +62,8 @@ class MeterRegistryConfigurer {
if
(
registry
instanceof
CompositeMeterRegistry
)
{
if
(
registry
instanceof
CompositeMeterRegistry
)
{
return
;
return
;
}
}
// Customizers must be applied before binders, as they may add custom
tags or
// Customizers must be applied before binders, as they may add custom
// alter timer or summary configuration.
//
tags or
alter timer or summary configuration.
customize
(
registry
);
customize
(
registry
);
addFilters
(
registry
);
addFilters
(
registry
);
addBinders
(
registry
);
addBinders
(
registry
);
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasProperties.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/atlas/AtlasPropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/ganglia/GangliaPropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/prometheus/PrometheusPropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/properties/PropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/properties/StepRegistryProperties.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/properties/StepRegistryPropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/simple/SimplePropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdPropertiesConfigAdapter.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/kafka/KafkaHealthIndicatorAutoConfigurationTests.java
View file @
5de46c31
...
@@ -53,4 +53,5 @@ public class KafkaHealthIndicatorAutoConfigurationTests {
...
@@ -53,4 +53,5 @@ public class KafkaHealthIndicatorAutoConfigurationTests {
.
doesNotHaveBean
(
KafkaHealthIndicator
.
class
)
.
doesNotHaveBean
(
KafkaHealthIndicator
.
class
)
.
hasSingleBean
(
ApplicationHealthIndicator
.
class
));
.
hasSingleBean
(
ApplicationHealthIndicator
.
class
));
}
}
}
}
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/kafka/KafkaHealthIndicator.java
View file @
5de46c31
...
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
...
@@ -38,6 +38,7 @@ import org.springframework.util.Assert;
* {@link HealthIndicator} for Kafka cluster.
* {@link HealthIndicator} for Kafka cluster.
*
*
* @author Juan Rada
* @author Juan Rada
* @since 2.0.0
*/
*/
public
class
KafkaHealthIndicator
extends
AbstractHealthIndicator
{
public
class
KafkaHealthIndicator
extends
AbstractHealthIndicator
{
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsFilter.java
View file @
5de46c31
...
@@ -128,11 +128,10 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
...
@@ -128,11 +128,10 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
private
Object
getHandler
(
HttpServletRequest
request
)
throws
Exception
{
private
Object
getHandler
(
HttpServletRequest
request
)
throws
Exception
{
HttpServletRequest
wrapper
=
new
UnmodifiableAttributesRequestWrapper
(
request
);
HttpServletRequest
wrapper
=
new
UnmodifiableAttributesRequestWrapper
(
request
);
for
(
HandlerMapping
handlerMapping
:
getMappingIntrospector
()
for
(
HandlerMapping
mapping
:
getMappingIntrospector
().
getHandlerMappings
())
{
.
getHandlerMappings
())
{
HandlerExecutionChain
chain
=
mapping
.
getHandler
(
wrapper
);
HandlerExecutionChain
chain
=
handlerMapping
.
getHandler
(
wrapper
);
if
(
chain
!=
null
)
{
if
(
chain
!=
null
)
{
if
(
handlerM
apping
instanceof
MatchableHandlerMapping
)
{
if
(
m
apping
instanceof
MatchableHandlerMapping
)
{
return
chain
.
getHandler
();
return
chain
.
getHandler
();
}
}
return
null
;
return
null
;
...
@@ -294,8 +293,8 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
...
@@ -294,8 +293,8 @@ public class WebMvcMetricsFilter extends OncePerRequestFilter {
@Override
@Override
public
void
setAttribute
(
String
name
,
Object
value
)
{
public
void
setAttribute
(
String
name
,
Object
value
)
{
}
}
}
}
}
}
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/jersey/JerseyWebEndpointIntegrationTests.java
View file @
5de46c31
...
@@ -132,27 +132,32 @@ public class JerseyWebEndpointIntegrationTests extends
...
@@ -132,27 +132,32 @@ public class JerseyWebEndpointIntegrationTests extends
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
filterChain
.
doFilter
(
new
HttpServletRequestWrapper
(
request
)
{
filterChain
.
doFilter
(
new
MockPrincipalWrapper
(
request
),
response
);
}
@Override
};
public
Principal
getUserPrincipal
()
{
}
return
new
Principal
()
{
}
@Override
private
static
class
MockPrincipalWrapper
extends
HttpServletRequestWrapper
{
public
String
getName
()
{
return
"Alice"
;
}
};
public
MockPrincipalWrapper
(
HttpServletRequest
request
)
{
super
(
request
);
}
}
@Override
public
Principal
getUserPrincipal
()
{
return
new
MockPrincipal
();
}
},
response
);
}
}
};
private
static
class
MockPrincipal
implements
Principal
{
@Override
public
String
getName
()
{
return
"Alice"
;
}
}
}
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointIntegrationTests.java
View file @
5de46c31
...
@@ -152,24 +152,34 @@ public class WebFluxEndpointIntegrationTests
...
@@ -152,24 +152,34 @@ public class WebFluxEndpointIntegrationTests
@Override
@Override
public
Mono
<
Void
>
filter
(
ServerWebExchange
exchange
,
public
Mono
<
Void
>
filter
(
ServerWebExchange
exchange
,
WebFilterChain
chain
)
{
WebFilterChain
chain
)
{
return
chain
.
filter
(
new
ServerWebExchangeDecorator
(
exchange
)
{
return
chain
.
filter
(
new
MockPrincipalServerWebExchangeDecorator
(
exchange
));
}
@Override
};
public
Mono
<
Principal
>
getPrincipal
()
{
}
return
Mono
.
just
(
new
Principal
()
{
@Override
}
public
String
getName
()
{
return
"Alice"
;
}
});
private
static
class
MockPrincipalServerWebExchangeDecorator
}
extends
ServerWebExchangeDecorator
{
});
protected
MockPrincipalServerWebExchangeDecorator
(
ServerWebExchange
delegate
)
{
}
super
(
delegate
);
}
};
@Override
public
Mono
<
Principal
>
getPrincipal
()
{
return
Mono
.
just
(
new
MockPrincipal
());
}
}
private
static
class
MockPrincipal
implements
Principal
{
@Override
public
String
getName
()
{
return
"Alice"
;
}
}
}
}
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/servlet/MvcWebEndpointIntegrationTests.java
View file @
5de46c31
...
@@ -146,27 +146,32 @@ public class MvcWebEndpointIntegrationTests extends
...
@@ -146,27 +146,32 @@ public class MvcWebEndpointIntegrationTests extends
protected
void
doFilterInternal
(
HttpServletRequest
request
,
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
filterChain
.
doFilter
(
new
HttpServletRequestWrapper
(
request
)
{
filterChain
.
doFilter
(
new
MockPrincipalWrapper
(
request
),
response
);
}
@Override
};
public
Principal
getUserPrincipal
()
{
}
return
new
Principal
()
{
}
@Override
private
static
class
MockPrincipalWrapper
extends
HttpServletRequestWrapper
{
public
String
getName
()
{
return
"Alice"
;
}
};
public
MockPrincipalWrapper
(
HttpServletRequest
request
)
{
super
(
request
);
}
}
@Override
public
Principal
getUserPrincipal
()
{
return
new
MockPrincipal
();
}
},
response
);
}
}
};
private
static
class
MockPrincipal
implements
Principal
{
@Override
public
String
getName
()
{
return
"Alice"
;
}
}
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveSecurityAutoConfiguration.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveUserDetailsServiceAutoConfiguration.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/ReactiveSecurityAutoConfigurationTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
5de46c31
...
@@ -6152,6 +6152,8 @@ NOTE: While Spring's test framework caches application contexts between tests an
...
@@ -6152,6 +6152,8 @@ NOTE: While Spring's test framework caches application contexts between tests an
a context for tests sharing the same configuration, the use of `@MockBean` or `@SpyBean`
a context for tests sharing the same configuration, the use of `@MockBean` or `@SpyBean`
influences the cache key, which will most likely increase the number of contexts.
influences the cache key, which will most likely increase the number of contexts.
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-tests]]
[[boot-features-testing-spring-boot-applications-testing-autoconfigured-tests]]
==== Auto-configured Tests
==== Auto-configured Tests
Spring Boot's auto-configuration system works well for applications but can sometimes be
Spring Boot's auto-configuration system works well for applications but can sometimes be
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/ExitCodeApplication.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/autoconfigure/UserService.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/builder/SpringApplicationBuilderExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/cloudfoundry/CloudFoundryIgnorePathsExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/context/EnvironmentPostProcessorExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/elasticsearch/HibernateSearchElasticsearchExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/elasticsearch/jest/JestClientCustomizationExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/jdbc/BasicDataSourceExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/jdbc/CompleteTwoDataSourcesExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/jdbc/ConfigurableDataSourceExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/jdbc/SimpleDataSourceExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/jdbc/SimpleTwoDataSourcesExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/test/autoconfigure/restdocs/restassured/AdvancedConfigurationExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/test/autoconfigure/restdocs/restassured/UserDocumentationTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/test/spock/SpockTestRestTemplateExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/UnauthenticatedAccessExample.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/builder/SpringApplicationBuilderExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/context/EnvironmentPostProcessorExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/context/embedded/TomcatLegacyCookieProcessorExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/jdbc/BasicDataSourceExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/jdbc/CompleteTwoDataSourcesExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/jdbc/ConfigurableDataSourceExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/jdbc/SampleApp.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/jdbc/SimpleDataSourceExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot-docs/src/test/java/org/springframework/boot/docs/test/spock/SpockTestRestTemplateExampleTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBindingPostProcessorRegistrar.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/JavaBeanBinder.java
View file @
5de46c31
...
@@ -127,27 +127,25 @@ class JavaBeanBinder implements BeanBinder {
...
@@ -127,27 +127,25 @@ class JavaBeanBinder implements BeanBinder {
int
parameterCount
=
method
.
getParameterCount
();
int
parameterCount
=
method
.
getParameterCount
();
if
(
name
.
startsWith
(
"get"
)
&&
parameterCount
==
0
)
{
if
(
name
.
startsWith
(
"get"
)
&&
parameterCount
==
0
)
{
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
this
.
properties
this
.
properties
.
computeIfAbsent
(
name
,
this
::
getBeanProperty
)
.
computeIfAbsent
(
name
,
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addGetter
(
method
);
.
addGetter
(
method
);
}
}
else
if
(
name
.
startsWith
(
"is"
)
&&
parameterCount
==
0
)
{
else
if
(
name
.
startsWith
(
"is"
)
&&
parameterCount
==
0
)
{
name
=
Introspector
.
decapitalize
(
name
.
substring
(
2
));
name
=
Introspector
.
decapitalize
(
name
.
substring
(
2
));
this
.
properties
this
.
properties
.
computeIfAbsent
(
name
,
this
::
getBeanProperty
)
.
computeIfAbsent
(
name
,
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addGetter
(
method
);
.
addGetter
(
method
);
}
}
else
if
(
name
.
startsWith
(
"set"
)
&&
parameterCount
==
1
)
{
else
if
(
name
.
startsWith
(
"set"
)
&&
parameterCount
==
1
)
{
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
name
=
Introspector
.
decapitalize
(
name
.
substring
(
3
));
this
.
properties
this
.
properties
.
computeIfAbsent
(
name
,
this
::
getBeanProperty
)
.
computeIfAbsent
(
name
,
(
n
)
->
new
BeanProperty
(
n
,
this
.
resolvableType
))
.
addSetter
(
method
);
.
addSetter
(
method
);
}
}
}
}
private
BeanProperty
getBeanProperty
(
String
name
)
{
return
new
BeanProperty
(
name
,
this
.
resolvableType
);
}
private
void
addField
(
Field
field
)
{
private
void
addField
(
Field
field
)
{
BeanProperty
property
=
this
.
properties
.
get
(
field
.
getName
());
BeanProperty
property
=
this
.
properties
.
get
(
field
.
getName
());
if
(
property
!=
null
)
{
if
(
property
!=
null
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/system/ApplicationHome.java
View file @
5de46c31
...
@@ -107,8 +107,7 @@ public class ApplicationHome {
...
@@ -107,8 +107,7 @@ public class ApplicationHome {
try
{
try
{
StackTraceElement
[]
stackTrace
=
Thread
.
currentThread
().
getStackTrace
();
StackTraceElement
[]
stackTrace
=
Thread
.
currentThread
().
getStackTrace
();
for
(
int
i
=
stackTrace
.
length
-
1
;
i
>=
0
;
i
--)
{
for
(
int
i
=
stackTrace
.
length
-
1
;
i
>=
0
;
i
--)
{
StackTraceElement
element
=
stackTrace
[
i
];
if
(
stackTrace
[
i
].
getClassName
().
startsWith
(
"org.junit."
))
{
if
(
element
.
getClassName
().
startsWith
(
"org.junit."
))
{
return
true
;
return
true
;
}
}
}
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BinderTests.java
View file @
5de46c31
...
@@ -370,6 +370,7 @@ public class BinderTests {
...
@@ -370,6 +370,7 @@ public class BinderTests {
public
void
setBar
(
T
bar
)
{
public
void
setBar
(
T
bar
)
{
this
.
bar
=
bar
;
this
.
bar
=
bar
;
}
}
}
}
}
}
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementPortSampleActuatorApplicationTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-samples/spring-boot-sample-kafka/pom.xml
View file @
5de46c31
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<parent>
<!-- Your own application should inherit from spring-boot-starter-parent -->
<!-- Your own application should inherit from spring-boot-starter-parent -->
...
@@ -11,11 +11,9 @@
...
@@ -11,11 +11,9 @@
<artifactId>
spring-boot-sample-kafka
</artifactId>
<artifactId>
spring-boot-sample-kafka
</artifactId>
<name>
Spring Boot Kafka Sample
</name>
<name>
Spring Boot Kafka Sample
</name>
<description>
Spring Boot Kafka Sample
</description>
<description>
Spring Boot Kafka Sample
</description>
<properties>
<properties>
<main.basedir>
${basedir}/../..
</main.basedir>
<main.basedir>
${basedir}/../..
</main.basedir>
</properties>
</properties>
<dependencies>
<dependencies>
<!-- Compile -->
<!-- Compile -->
<dependency>
<dependency>
...
@@ -38,7 +36,6 @@
...
@@ -38,7 +36,6 @@
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
spring-boot-samples/spring-boot-sample-kafka/src/main/java/sample/kafka/Consumer.java
View file @
5de46c31
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
kafka
;
package
sample
.
kafka
;
import
org.springframework.kafka.annotation.KafkaListener
;
import
org.springframework.kafka.annotation.KafkaListener
;
...
@@ -26,4 +27,4 @@ class Consumer {
...
@@ -26,4 +27,4 @@ class Consumer {
System
.
out
.
println
(
"Received sample message ["
+
message
+
"]"
);
System
.
out
.
println
(
"Received sample message ["
+
message
+
"]"
);
}
}
}
}
\ No newline at end of file
spring-boot-samples/spring-boot-sample-kafka/src/main/java/sample/kafka/Producer.java
View file @
5de46c31
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
kafka
;
package
sample
.
kafka
;
import
org.springframework.kafka.core.KafkaTemplate
;
import
org.springframework.kafka.core.KafkaTemplate
;
...
@@ -32,4 +33,4 @@ public class Producer {
...
@@ -32,4 +33,4 @@ public class Producer {
System
.
out
.
println
(
"Sent sample message ["
+
message
+
"]"
);
System
.
out
.
println
(
"Sent sample message ["
+
message
+
"]"
);
}
}
}
}
\ No newline at end of file
spring-boot-samples/spring-boot-sample-kafka/src/main/java/sample/kafka/SampleKafkaApplication.java
View file @
5de46c31
...
@@ -13,12 +13,12 @@
...
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
kafka
;
package
sample
.
kafka
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
@SpringBootApplication
@SpringBootApplication
...
...
spring-boot-samples/spring-boot-sample-kafka/src/main/java/sample/kafka/SampleMessage.java
View file @
5de46c31
...
@@ -41,11 +41,7 @@ public class SampleMessage {
...
@@ -41,11 +41,7 @@ public class SampleMessage {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
final
StringBuilder
sb
=
new
StringBuilder
(
"SampleMessage{"
);
return
"SampleMessage{id="
+
this
.
id
+
", message='"
+
this
.
message
+
"'}"
;
sb
.
append
(
"id="
).
append
(
this
.
id
);
sb
.
append
(
", message='"
).
append
(
this
.
message
).
append
(
'\''
);
sb
.
append
(
'}'
);
return
sb
.
toString
();
}
}
}
}
spring-boot-samples/spring-boot-sample-kafka/src/test/java/sample/kafka/SampleKafkaApplicationTests.java
View file @
5de46c31
...
@@ -22,7 +22,6 @@ import org.junit.Rule;
...
@@ -22,7 +22,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.boot.test.context.TestConfiguration
;
import
org.springframework.boot.test.context.TestConfiguration
;
import
org.springframework.boot.test.rule.OutputCapture
;
import
org.springframework.boot.test.rule.OutputCapture
;
...
@@ -64,11 +63,13 @@ public class SampleKafkaApplicationTests {
...
@@ -64,11 +63,13 @@ public class SampleKafkaApplicationTests {
@Bean
@Bean
public
Consumer
consumer
()
{
public
Consumer
consumer
()
{
return
new
Consumer
()
{
return
new
Consumer
()
{
@Override
@Override
public
void
processMessage
(
SampleMessage
message
)
{
public
void
processMessage
(
SampleMessage
message
)
{
super
.
processMessage
(
message
);
super
.
processMessage
(
message
);
latch
.
countDown
();
latch
.
countDown
();
}
}
};
};
}
}
...
...
spring-boot-samples/spring-boot-sample-secure-webflux/src/test/java/sample/secure/webflux/SampleSecureWebFluxApplicationTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-samples/spring-boot-sample-test/src/test/java/sample/test/web/UserVehicleControllerTests.java
View file @
5de46c31
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
8
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
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