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
aa2008bc
Commit
aa2008bc
authored
Mar 11, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x'
parents
09d51089
f0ef6933
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
78 additions
and
23 deletions
+78
-23
CompositeMeterRegistryConfiguration.java
...onfigure/metrics/CompositeMeterRegistryConfiguration.java
+3
-1
JerseyManagementContextConfiguration.java
...gure/web/jersey/JerseyManagementContextConfiguration.java
+2
-0
JerseyServerMetricsAutoConfigurationTests.java
...ics/jersey/JerseyServerMetricsAutoConfigurationTests.java
+4
-1
ScheduledTasksEndpointAutoConfigurationTests.java
...eduling/ScheduledTasksEndpointAutoConfigurationTests.java
+2
-0
AbstractEndpointRequestIntegrationTests.java
...rity/servlet/AbstractEndpointRequestIntegrationTests.java
+2
-1
WebMvcEndpointChildContextConfigurationTests.java
...servlet/WebMvcEndpointChildContextConfigurationTests.java
+4
-1
WebMvcMetricsIntegrationTests.java
...te/metrics/web/servlet/WebMvcMetricsIntegrationTests.java
+2
-1
ScheduledTasksEndpointTests.java
.../boot/actuate/scheduling/ScheduledTasksEndpointTests.java
+3
-1
DataSourceConfiguration.java
...work/boot/autoconfigure/jdbc/DataSourceConfiguration.java
+6
-1
ReactiveWebServerFactoryConfiguration.java
...e/web/reactive/ReactiveWebServerFactoryConfiguration.java
+2
-1
BatchAutoConfigurationTests.java
...boot/autoconfigure/batch/BatchAutoConfigurationTests.java
+4
-1
JndiDataSourceAutoConfigurationTests.java
...oconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java
+6
-3
KafkaAutoConfigurationIntegrationTests.java
...nfigure/kafka/KafkaAutoConfigurationIntegrationTests.java
+1
-1
MongoAutoConfigurationTests.java
...boot/autoconfigure/mongo/MongoAutoConfigurationTests.java
+1
-0
MultipartAutoConfigurationTests.java
...onfigure/web/servlet/MultipartAutoConfigurationTests.java
+3
-1
WebSocketServletAutoConfigurationTests.java
...ocket/servlet/WebSocketServletAutoConfigurationTests.java
+2
-1
EagerInitializationAutoConfiguration.java
...s/autoconfigure/EagerInitializationAutoConfiguration.java
+2
-0
HttpTunnelIntegrationTests.java
.../devtools/integrationtest/HttpTunnelIntegrationTests.java
+2
-1
CloudFoundryCustomContextPathExample.java
...cs/cloudfoundry/CloudFoundryCustomContextPathExample.java
+3
-1
CustomWebFluxSecurityExample.java
.../boot/docs/web/security/CustomWebFluxSecurityExample.java
+3
-1
SpringBootMockMvcBuilderCustomizerTests.java
.../web/servlet/SpringBootMockMvcBuilderCustomizerTests.java
+4
-1
ImportsContextCustomizerFactoryTests.java
...ot/test/context/ImportsContextCustomizerFactoryTests.java
+2
-0
BeanCurrentlyInCreationFailureAnalyzerTests.java
...analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
+3
-1
InvalidConfigurationPropertyNameFailureAnalyzerTests.java
...InvalidConfigurationPropertyNameFailureAnalyzerTests.java
+3
-1
NoUniqueBeanDefinitionFailureAnalyzerTests.java
.../analyzer/NoUniqueBeanDefinitionFailureAnalyzerTests.java
+2
-1
ServletContextInitializerBeansTests.java
...boot/web/servlet/ServletContextInitializerBeansTests.java
+4
-0
SampleParentContextApplication.java
...in/java/sample/parent/SampleParentContextApplication.java
+3
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/CompositeMeterRegistryConfiguration.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandi
...
@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandi
import
org.springframework.boot.autoconfigure.condition.NoneNestedConditions
;
import
org.springframework.boot.autoconfigure.condition.NoneNestedConditions
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Conditional
;
import
org.springframework.context.annotation.Conditional
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Primary
;
/**
/**
...
@@ -35,6 +36,7 @@ import org.springframework.context.annotation.Primary;
...
@@ -35,6 +36,7 @@ import org.springframework.context.annotation.Primary;
*
*
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@Configuration
@Conditional
(
MultipleNonPrimaryMeterRegistriesCondition
.
class
)
@Conditional
(
MultipleNonPrimaryMeterRegistriesCondition
.
class
)
class
CompositeMeterRegistryConfiguration
{
class
CompositeMeterRegistryConfiguration
{
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseyManagementContextConfiguration.java
View file @
aa2008bc
...
@@ -23,12 +23,14 @@ import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
...
@@ -23,12 +23,14 @@ import org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer;
import
org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath
;
import
org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath
;
import
org.springframework.boot.web.servlet.ServletRegistrationBean
;
import
org.springframework.boot.web.servlet.ServletRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
/**
* Shared configuration for Jersey-based actuators regardless of management context type.
* Shared configuration for Jersey-based actuators regardless of management context type.
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@Configuration
class
JerseyManagementContextConfiguration
{
class
JerseyManagementContextConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/jersey/JerseyServerMetricsAutoConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -45,6 +45,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
...
@@ -45,6 +45,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import
org.springframework.boot.test.context.runner.WebApplicationContextRunner
;
import
org.springframework.boot.test.context.runner.WebApplicationContextRunner
;
import
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
;
import
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
@@ -127,6 +128,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
...
@@ -127,6 +128,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
String
.
class
);
String
.
class
);
}
}
@Configuration
static
class
ResourceConfiguration
{
static
class
ResourceConfiguration
{
@Bean
@Bean
...
@@ -147,6 +149,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
...
@@ -147,6 +149,7 @@ public class JerseyServerMetricsAutoConfigurationTests {
}
}
@Configuration
static
class
CustomJerseyTagsProviderConfiguration
{
static
class
CustomJerseyTagsProviderConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/scheduling/ScheduledTasksEndpointAutoConfigurationTests.java
View file @
aa2008bc
...
@@ -24,6 +24,7 @@ import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint;
...
@@ -24,6 +24,7 @@ import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.autoconfigure.AutoConfigurations
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
@@ -69,6 +70,7 @@ public class ScheduledTasksEndpointAutoConfigurationTests {
...
@@ -69,6 +70,7 @@ public class ScheduledTasksEndpointAutoConfigurationTests {
.
hasBean
(
"customEndpoint"
));
.
hasBean
(
"customEndpoint"
));
}
}
@Configuration
private
static
class
CustomEndpointConfiguration
{
private
static
class
CustomEndpointConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/AbstractEndpointRequestIntegrationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -96,6 +96,7 @@ public abstract class AbstractEndpointRequestIntegrationTests {
...
@@ -96,6 +96,7 @@ public abstract class AbstractEndpointRequestIntegrationTests {
return
"Basic "
+
Base64
.
getEncoder
().
encodeToString
(
"user:password"
.
getBytes
());
return
"Basic "
+
Base64
.
getEncoder
().
encodeToString
(
"user:password"
.
getBytes
());
}
}
@Configuration
static
class
BaseConfiguration
{
static
class
BaseConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -22,6 +22,7 @@ import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath;
...
@@ -22,6 +22,7 @@ import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletPath;
import
org.springframework.boot.test.context.runner.WebApplicationContextRunner
;
import
org.springframework.boot.test.context.runner.WebApplicationContextRunner
;
import
org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter
;
import
org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.context.request.RequestContextListener
;
import
org.springframework.web.context.request.RequestContextListener
;
import
org.springframework.web.filter.RequestContextFilter
;
import
org.springframework.web.filter.RequestContextFilter
;
...
@@ -72,6 +73,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
...
@@ -72,6 +73,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
.
isEqualTo
(
"/"
));
.
isEqualTo
(
"/"
));
}
}
@Configuration
static
class
ExistingConfig
{
static
class
ExistingConfig
{
@Bean
@Bean
...
@@ -81,6 +83,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
...
@@ -81,6 +83,7 @@ public class WebMvcEndpointChildContextConfigurationTests {
}
}
@Configuration
static
class
RequestContextListenerConfig
{
static
class
RequestContextListenerConfig
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcMetricsIntegrationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -114,6 +114,7 @@ public class WebMvcMetricsIntegrationTests {
...
@@ -114,6 +114,7 @@ public class WebMvcMetricsIntegrationTests {
"http.server.requests"
,
true
);
"http.server.requests"
,
true
);
}
}
@Configuration
@RestController
@RestController
@RequestMapping
(
"/api"
)
@RequestMapping
(
"/api"
)
@Timed
@Timed
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/scheduling/ScheduledTasksEndpointTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -30,6 +30,7 @@ import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint.FixedR
...
@@ -30,6 +30,7 @@ import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint.FixedR
import
org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint.ScheduledTasksReport
;
import
org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint.ScheduledTasksReport
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.boot.test.context.runner.ApplicationContextRunner
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.Trigger
;
import
org.springframework.scheduling.Trigger
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
...
@@ -166,6 +167,7 @@ public class ScheduledTasksEndpointTests {
...
@@ -166,6 +167,7 @@ public class ScheduledTasksEndpointTests {
.
accept
(
context
.
getBean
(
ScheduledTasksEndpoint
.
class
).
scheduledTasks
()));
.
accept
(
context
.
getBean
(
ScheduledTasksEndpoint
.
class
).
scheduledTasks
()));
}
}
@Configuration
@EnableScheduling
@EnableScheduling
private
static
class
BaseConfiguration
{
private
static
class
BaseConfiguration
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
...
@@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DatabaseDriver
;
import
org.springframework.boot.jdbc.DatabaseDriver
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
/**
/**
...
@@ -46,6 +47,7 @@ abstract class DataSourceConfiguration {
...
@@ -46,6 +47,7 @@ abstract class DataSourceConfiguration {
/**
/**
* Tomcat Pool DataSource configuration.
* Tomcat Pool DataSource configuration.
*/
*/
@Configuration
@ConditionalOnClass
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
@ConditionalOnClass
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.tomcat.jdbc.pool.DataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.tomcat.jdbc.pool.DataSource"
,
matchIfMissing
=
true
)
...
@@ -72,6 +74,7 @@ abstract class DataSourceConfiguration {
...
@@ -72,6 +74,7 @@ abstract class DataSourceConfiguration {
/**
/**
* Hikari DataSource configuration.
* Hikari DataSource configuration.
*/
*/
@Configuration
@ConditionalOnClass
(
HikariDataSource
.
class
)
@ConditionalOnClass
(
HikariDataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"com.zaxxer.hikari.HikariDataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"com.zaxxer.hikari.HikariDataSource"
,
matchIfMissing
=
true
)
...
@@ -93,6 +96,7 @@ abstract class DataSourceConfiguration {
...
@@ -93,6 +96,7 @@ abstract class DataSourceConfiguration {
/**
/**
* DBCP DataSource configuration.
* DBCP DataSource configuration.
*/
*/
@Configuration
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
)
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp2.BasicDataSource"
,
matchIfMissing
=
true
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp2.BasicDataSource"
,
matchIfMissing
=
true
)
...
@@ -111,6 +115,7 @@ abstract class DataSourceConfiguration {
...
@@ -111,6 +115,7 @@ abstract class DataSourceConfiguration {
/**
/**
* Generic DataSource configuration.
* Generic DataSource configuration.
*/
*/
@Configuration
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
)
static
class
Generic
{
static
class
Generic
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryConfiguration.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -108,6 +108,7 @@ abstract class ReactiveWebServerFactoryConfiguration {
...
@@ -108,6 +108,7 @@ abstract class ReactiveWebServerFactoryConfiguration {
}
}
@Configuration
@ConditionalOnMissingBean
(
ReactiveWebServerFactory
.
class
)
@ConditionalOnMissingBean
(
ReactiveWebServerFactory
.
class
)
@ConditionalOnClass
({
Undertow
.
class
})
@ConditionalOnClass
({
Undertow
.
class
})
static
class
EmbeddedUndertow
{
static
class
EmbeddedUndertow
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -307,6 +307,7 @@ public class BatchAutoConfigurationTests {
...
@@ -307,6 +307,7 @@ public class BatchAutoConfigurationTests {
}
}
@Configuration
@EnableBatchProcessing
@EnableBatchProcessing
protected
static
class
NamedJobConfigurationWithRegisteredJob
{
protected
static
class
NamedJobConfigurationWithRegisteredJob
{
...
@@ -348,6 +349,7 @@ public class BatchAutoConfigurationTests {
...
@@ -348,6 +349,7 @@ public class BatchAutoConfigurationTests {
}
}
@Configuration
@EnableBatchProcessing
@EnableBatchProcessing
protected
static
class
NamedJobConfigurationWithLocalJob
{
protected
static
class
NamedJobConfigurationWithLocalJob
{
...
@@ -379,6 +381,7 @@ public class BatchAutoConfigurationTests {
...
@@ -379,6 +381,7 @@ public class BatchAutoConfigurationTests {
}
}
@Configuration
@EnableBatchProcessing
@EnableBatchProcessing
protected
static
class
JobConfiguration
{
protected
static
class
JobConfiguration
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -32,6 +32,7 @@ import org.springframework.boot.autoconfigure.jndi.TestableInitialContextFactory
...
@@ -32,6 +32,7 @@ import org.springframework.boot.autoconfigure.jndi.TestableInitialContextFactory
import
org.springframework.boot.test.util.TestPropertyValues
;
import
org.springframework.boot.test.util.TestPropertyValues
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.jmx.export.MBeanExporter
;
import
org.springframework.jmx.export.MBeanExporter
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.test.util.ReflectionTestUtils
;
...
@@ -161,7 +162,8 @@ public class JndiDataSourceAutoConfigurationTests {
...
@@ -161,7 +162,8 @@ public class JndiDataSourceAutoConfigurationTests {
TestableInitialContextFactory
.
bind
(
name
,
dataSource
);
TestableInitialContextFactory
.
bind
(
name
,
dataSource
);
}
}
private
static
class
MBeanExporterConfiguration
{
@Configuration
static
class
MBeanExporterConfiguration
{
@Bean
@Bean
MBeanExporter
mbeanExporter
()
{
MBeanExporter
mbeanExporter
()
{
...
@@ -170,7 +172,8 @@ public class JndiDataSourceAutoConfigurationTests {
...
@@ -170,7 +172,8 @@ public class JndiDataSourceAutoConfigurationTests {
}
}
private
static
class
AnotherMBeanExporterConfiguration
{
@Configuration
static
class
AnotherMBeanExporterConfiguration
{
@Bean
@Bean
MBeanExporter
anotherMbeanExporter
()
{
MBeanExporter
anotherMbeanExporter
()
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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/mongo/MongoAutoConfigurationTests.java
View file @
aa2008bc
...
@@ -111,6 +111,7 @@ public class MongoAutoConfigurationTests {
...
@@ -111,6 +111,7 @@ public class MongoAutoConfigurationTests {
}
}
@Configuration
static
class
FallbackMongoClientConfig
{
static
class
FallbackMongoClientConfig
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/MultipartAutoConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -382,6 +382,7 @@ public class MultipartAutoConfigurationTests {
...
@@ -382,6 +382,7 @@ public class MultipartAutoConfigurationTests {
}
}
@Configuration
public
static
class
WebServerWithCustomMultipartResolver
{
public
static
class
WebServerWithCustomMultipartResolver
{
@Bean
@Bean
...
@@ -391,6 +392,7 @@ public class MultipartAutoConfigurationTests {
...
@@ -391,6 +392,7 @@ public class MultipartAutoConfigurationTests {
}
}
@Configuration
public
static
class
ContainerWithCommonsMultipartResolver
{
public
static
class
ContainerWithCommonsMultipartResolver
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/servlet/WebSocketServletAutoConfigurationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -75,6 +75,7 @@ public class WebSocketServletAutoConfigurationTests {
...
@@ -75,6 +75,7 @@ public class WebSocketServletAutoConfigurationTests {
}
}
@Configuration
static
class
CommonConfiguration
{
static
class
CommonConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/EagerInitializationAutoConfiguration.java
View file @
aa2008bc
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
/**
/**
...
@@ -31,6 +32,7 @@ import org.springframework.core.Ordered;
...
@@ -31,6 +32,7 @@ import org.springframework.core.Ordered;
* @author Andy Wilkinson
* @author Andy Wilkinson
* @since 2.2.0
* @since 2.2.0
*/
*/
@Configuration
public
class
EagerInitializationAutoConfiguration
{
public
class
EagerInitializationAutoConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/integrationtest/HttpTunnelIntegrationTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -128,6 +128,7 @@ public class HttpTunnelIntegrationTests {
...
@@ -128,6 +128,7 @@ public class HttpTunnelIntegrationTests {
}
}
@org
.
springframework
.
context
.
annotation
.
Configuration
static
class
TunnelConfiguration
{
static
class
TunnelConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/cloudfoundry/CloudFoundryCustomContextPathExample.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -34,12 +34,14 @@ import org.apache.catalina.startup.Tomcat;
...
@@ -34,12 +34,14 @@ import org.apache.catalina.startup.Tomcat;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.servlet.ServletContextInitializer
;
import
org.springframework.boot.web.servlet.ServletContextInitializer
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
/**
* Example configuration for custom context path in Cloud Foundry.
* Example configuration for custom context path in Cloud Foundry.
*
*
* @author Johnny Lim
* @author Johnny Lim
*/
*/
@Configuration
public
class
CloudFoundryCustomContextPathExample
{
public
class
CloudFoundryCustomContextPathExample
{
// tag::configuration[]
// tag::configuration[]
...
...
spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/security/CustomWebFluxSecurityExample.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -18,6 +18,7 @@ package org.springframework.boot.docs.web.security;
...
@@ -18,6 +18,7 @@ package org.springframework.boot.docs.web.security;
import
org.springframework.boot.autoconfigure.security.reactive.PathRequest
;
import
org.springframework.boot.autoconfigure.security.reactive.PathRequest
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.config.web.server.ServerHttpSecurity
;
import
org.springframework.security.config.web.server.ServerHttpSecurity
;
import
org.springframework.security.web.server.SecurityWebFilterChain
;
import
org.springframework.security.web.server.SecurityWebFilterChain
;
...
@@ -26,6 +27,7 @@ import org.springframework.security.web.server.SecurityWebFilterChain;
...
@@ -26,6 +27,7 @@ import org.springframework.security.web.server.SecurityWebFilterChain;
*
*
* @author Madhura Bhave
* @author Madhura Bhave
*/
*/
@Configuration
public
class
CustomWebFluxSecurityExample
{
public
class
CustomWebFluxSecurityExample
{
// @formatter:off
// @formatter:off
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizerTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -28,6 +28,7 @@ import org.junit.Test;
...
@@ -28,6 +28,7 @@ import org.junit.Test;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.mock.web.MockServletContext
;
import
org.springframework.mock.web.MockServletContext
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.test.util.ReflectionTestUtils
;
import
org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder
;
import
org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder
;
...
@@ -65,6 +66,7 @@ public class SpringBootMockMvcBuilderCustomizerTests {
...
@@ -65,6 +66,7 @@ public class SpringBootMockMvcBuilderCustomizerTests {
assertThat
(
filters
).
containsExactlyInAnyOrder
(
testFilter
,
otherTestFilter
);
assertThat
(
filters
).
containsExactlyInAnyOrder
(
testFilter
,
otherTestFilter
);
}
}
@Configuration
static
class
ServletConfiguration
{
static
class
ServletConfiguration
{
@Bean
@Bean
...
@@ -74,6 +76,7 @@ public class SpringBootMockMvcBuilderCustomizerTests {
...
@@ -74,6 +76,7 @@ public class SpringBootMockMvcBuilderCustomizerTests {
}
}
@Configuration
static
class
FilterConfiguration
{
static
class
FilterConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/ImportsContextCustomizerFactoryTests.java
View file @
aa2008bc
...
@@ -23,6 +23,7 @@ import org.junit.Test;
...
@@ -23,6 +23,7 @@ import org.junit.Test;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.test.context.ContextCustomizer
;
import
org.springframework.test.context.ContextCustomizer
;
...
@@ -130,6 +131,7 @@ public class ImportsContextCustomizerFactoryTests {
...
@@ -130,6 +131,7 @@ public class ImportsContextCustomizerFactoryTests {
}
}
@Configuration
@Import
(
ImportedBean
.
class
)
@Import
(
ImportedBean
.
class
)
static
class
TestWithImportAndBeanMethod
{
static
class
TestWithImportAndBeanMethod
{
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -226,6 +226,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
...
@@ -226,6 +226,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
return
new
BeanOne
();
return
new
BeanOne
();
}
}
@org
.
springframework
.
context
.
annotation
.
Configuration
public
static
class
BeanTwoConfiguration
{
public
static
class
BeanTwoConfiguration
{
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
...
@@ -239,6 +240,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
...
@@ -239,6 +240,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
}
}
@org
.
springframework
.
context
.
annotation
.
Configuration
public
static
class
BeanThreeConfiguration
{
public
static
class
BeanThreeConfiguration
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/InvalidConfigurationPropertyNameFailureAnalyzerTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -24,6 +24,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
...
@@ -24,6 +24,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.boot.diagnostics.FailureAnalysis
;
import
org.springframework.boot.diagnostics.FailureAnalysis
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
@@ -60,6 +61,7 @@ public class InvalidConfigurationPropertyNameFailureAnalyzerTests {
...
@@ -60,6 +61,7 @@ public class InvalidConfigurationPropertyNameFailureAnalyzerTests {
}
}
}
}
@Configuration
@EnableConfigurationProperties
(
InvalidPrefixProperties
.
class
)
@EnableConfigurationProperties
(
InvalidPrefixProperties
.
class
)
static
class
InvalidPrefixConfiguration
{
static
class
InvalidPrefixConfiguration
{
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzerTests.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -153,6 +153,7 @@ public class NoUniqueBeanDefinitionFailureAnalyzerTests {
...
@@ -153,6 +153,7 @@ public class NoUniqueBeanDefinitionFailureAnalyzerTests {
}
}
@Configuration
static
class
ParentProducer
{
static
class
ParentProducer
{
@Bean
@Bean
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletContextInitializerBeansTests.java
View file @
aa2008bc
...
@@ -30,6 +30,7 @@ import org.junit.Test;
...
@@ -30,6 +30,7 @@ import org.junit.Test;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
@@ -76,6 +77,7 @@ public class ServletContextInitializerBeansTests {
...
@@ -76,6 +77,7 @@ public class ServletContextInitializerBeansTests {
this
.
context
=
new
AnnotationConfigApplicationContext
(
configuration
);
this
.
context
=
new
AnnotationConfigApplicationContext
(
configuration
);
}
}
@Configuration
static
class
ServletConfiguration
{
static
class
ServletConfiguration
{
@Bean
@Bean
...
@@ -85,6 +87,7 @@ public class ServletContextInitializerBeansTests {
...
@@ -85,6 +87,7 @@ public class ServletContextInitializerBeansTests {
}
}
@Configuration
static
class
FilterConfiguration
{
static
class
FilterConfiguration
{
@Bean
@Bean
...
@@ -94,6 +97,7 @@ public class ServletContextInitializerBeansTests {
...
@@ -94,6 +97,7 @@ public class ServletContextInitializerBeansTests {
}
}
@Configuration
static
class
TestConfiguration
{
static
class
TestConfiguration
{
@Bean
@Bean
...
...
spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java
View file @
aa2008bc
/*
/*
* Copyright 2012-201
8
the original author or authors.
* Copyright 2012-201
9
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.
...
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.integration.channel.DirectChannel
;
import
org.springframework.integration.channel.DirectChannel
;
import
org.springframework.integration.dsl.IntegrationFlow
;
import
org.springframework.integration.dsl.IntegrationFlow
;
import
org.springframework.integration.dsl.IntegrationFlows
;
import
org.springframework.integration.dsl.IntegrationFlows
;
...
@@ -39,6 +40,7 @@ public class SampleParentContextApplication {
...
@@ -39,6 +40,7 @@ public class SampleParentContextApplication {
.
child
(
SampleParentContextApplication
.
class
).
run
(
args
);
.
child
(
SampleParentContextApplication
.
class
).
run
(
args
);
}
}
@Configuration
@EnableAutoConfiguration
@EnableAutoConfiguration
@EnableConfigurationProperties
(
ServiceProperties
.
class
)
@EnableConfigurationProperties
(
ServiceProperties
.
class
)
protected
static
class
Parent
{
protected
static
class
Parent
{
...
...
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