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
821ee0cf
Commit
821ee0cf
authored
Mar 11, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that @Bean methods are only declared on @Configuration classes
Closes gh-16190
parent
3fdf2818
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
73 additions
and
24 deletions
+73
-24
EndpointAutoConfigurationTests.java
...actuate/autoconfigure/EndpointAutoConfigurationTests.java
+2
-1
EndpointWebMvcManagementContextConfigurationTests.java
...re/EndpointWebMvcManagementContextConfigurationTests.java
+8
-1
HealthIndicatorAutoConfigurationTests.java
.../autoconfigure/HealthIndicatorAutoConfigurationTests.java
+2
-1
PersistenceExceptionTranslationAutoConfiguration.java
...dao/PersistenceExceptionTranslationAutoConfiguration.java
+3
-1
HypermediaHttpMessageConverterConfiguration.java
.../hateoas/HypermediaHttpMessageConverterConfiguration.java
+3
-1
DataSourceConfiguration.java
...work/boot/autoconfigure/jdbc/DataSourceConfiguration.java
+7
-1
XADataSourceAutoConfiguration.java
...oot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java
+3
-1
BatchAutoConfigurationTests.java
...boot/autoconfigure/batch/BatchAutoConfigurationTests.java
+4
-1
ConditionalOnPropertyTests.java
...t/autoconfigure/condition/ConditionalOnPropertyTests.java
+3
-1
JndiDataSourceAutoConfigurationTests.java
...oconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java
+6
-3
KafkaAutoConfigurationIntegrationTests.java
...nfigure/kafka/KafkaAutoConfigurationIntegrationTests.java
+3
-1
ResourceServerTokenServicesConfigurationTests.java
...source/ResourceServerTokenServicesConfigurationTests.java
+3
-1
MultipartAutoConfigurationTests.java
...ot/autoconfigure/web/MultipartAutoConfigurationTests.java
+3
-1
WebSocketAutoConfigurationTests.java
...oconfigure/websocket/WebSocketAutoConfigurationTests.java
+2
-1
RemoteClientConfiguration.java
...oot/devtools/remote/client/RemoteClientConfiguration.java
+4
-1
SampleParentContextApplication.java
...in/java/sample/parent/SampleParentContextApplication.java
+3
-1
JsonTestersAutoConfiguration.java
...test/autoconfigure/json/JsonTestersAutoConfiguration.java
+5
-3
BeanCurrentlyInCreationFailureAnalyzerTests.java
...analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
+3
-1
NoUniqueBeanDefinitionFailureAnalyzerTests.java
.../analyzer/NoUniqueBeanDefinitionFailureAnalyzerTests.java
+2
-1
ServletContextInitializerBeansTests.java
...boot/web/servlet/ServletContextInitializerBeansTests.java
+4
-1
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java
View file @
821ee0cf
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -334,6 +334,7 @@ public class EndpointAutoConfigurationTests {
}
@Configuration
static
class
DataSourceConfig
{
@Bean
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcManagementContextConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -198,6 +198,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
EnvConfiguration
{
@Bean
...
...
@@ -208,6 +209,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
MetricsConfiguration
{
@Bean
...
...
@@ -217,6 +219,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
LoggersConfiguration
{
@Bean
...
...
@@ -236,6 +239,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
LogFileConfiguration
{
@Bean
...
...
@@ -245,6 +249,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
AuditEventsConfiguration
{
@Bean
...
...
@@ -264,6 +269,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
HeapdumpConfiguration
{
@Bean
...
...
@@ -273,6 +279,7 @@ public class EndpointWebMvcManagementContextConfigurationTests {
}
@Configuration
static
class
ShutdownConfiguration
{
@Bean
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -627,6 +627,7 @@ public class HealthIndicatorAutoConfigurationTests {
}
@Configuration
protected
static
class
JestClientConfiguration
{
@Bean
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/dao/PersistenceExceptionTranslationAutoConfiguration.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -22,6 +22,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.bind.RelaxedPropertyResolver
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.Environment
;
import
org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor
;
...
...
@@ -33,6 +34,7 @@ import org.springframework.dao.annotation.PersistenceExceptionTranslationPostPro
* @author Stephane Nicoll
* @since 1.2.0
*/
@Configuration
@ConditionalOnClass
(
PersistenceExceptionTranslationPostProcessor
.
class
)
public
class
PersistenceExceptionTranslationAutoConfiguration
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/hateoas/HypermediaHttpMessageConverterConfiguration.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.ListableBeanFactory;
import
org.springframework.beans.factory.config.BeanPostProcessor
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessageConverter
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.converter.AbstractHttpMessageConverter
;
...
...
@@ -41,6 +42,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
*
* @author Andy Wilkinson
*/
@Configuration
public
class
HypermediaHttpMessageConverterConfiguration
{
@Bean
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DatabaseDriver
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* Actual DataSource configurations imported by {@link DataSourceAutoConfiguration}.
...
...
@@ -45,6 +46,7 @@ abstract class DataSourceConfiguration {
/**
* Tomcat Pool DataSource configuration.
*/
@Configuration
@ConditionalOnClass
(
org
.
apache
.
tomcat
.
jdbc
.
pool
.
DataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.tomcat.jdbc.pool.DataSource"
,
matchIfMissing
=
true
)
...
...
@@ -71,6 +73,7 @@ abstract class DataSourceConfiguration {
/**
* Hikari DataSource configuration.
*/
@Configuration
@ConditionalOnClass
(
HikariDataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"com.zaxxer.hikari.HikariDataSource"
,
matchIfMissing
=
true
)
...
...
@@ -89,6 +92,7 @@ abstract class DataSourceConfiguration {
*
* @deprecated as of 1.5 in favor of DBCP2
*/
@Configuration
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp
.
BasicDataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp.BasicDataSource"
,
matchIfMissing
=
true
)
...
...
@@ -116,6 +120,7 @@ abstract class DataSourceConfiguration {
/**
* DBCP DataSource configuration.
*/
@Configuration
@ConditionalOnClass
(
org
.
apache
.
commons
.
dbcp2
.
BasicDataSource
.
class
)
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
,
havingValue
=
"org.apache.commons.dbcp2.BasicDataSource"
,
matchIfMissing
=
true
)
...
...
@@ -134,6 +139,7 @@ abstract class DataSourceConfiguration {
/**
* Generic DataSource configuration.
*/
@Configuration
@ConditionalOnMissingBean
(
DataSource
.
class
)
@ConditionalOnProperty
(
name
=
"spring.datasource.type"
)
static
class
Generic
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/XADataSourceAutoConfiguration.java
View file @
821ee0cf
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -34,6 +34,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.boot.jdbc.DatabaseDriver
;
import
org.springframework.boot.jta.XADataSourceWrapper
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ClassUtils
;
...
...
@@ -46,6 +47,7 @@ import org.springframework.util.StringUtils;
* @author Josh Long
* @since 1.2.0
*/
@Configuration
@AutoConfigureBefore
(
DataSourceAutoConfiguration
.
class
)
@EnableConfigurationProperties
(
DataSourceProperties
.
class
)
@ConditionalOnClass
({
DataSource
.
class
,
TransactionManager
.
class
,
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/batch/BatchAutoConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -371,6 +371,7 @@ public class BatchAutoConfigurationTests {
}
@EnableBatchProcessing
@Configuration
protected
static
class
NamedJobConfigurationWithRegisteredJob
{
@Autowired
...
...
@@ -413,6 +414,7 @@ public class BatchAutoConfigurationTests {
}
@EnableBatchProcessing
@Configuration
protected
static
class
NamedJobConfigurationWithLocalJob
{
@Autowired
...
...
@@ -444,6 +446,7 @@ public class BatchAutoConfigurationTests {
}
@Configuration
@EnableBatchProcessing
protected
static
class
JobConfiguration
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnPropertyTests.java
View file @
821ee0cf
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -434,6 +434,7 @@ public class ConditionalOnPropertyTests {
}
@Configuration
@ConditionalOnMyFeature
protected
static
class
MetaAnnotation
{
...
...
@@ -444,6 +445,7 @@ public class ConditionalOnPropertyTests {
}
@Configuration
@ConditionalOnMyFeature
@ConditionalOnProperty
(
prefix
=
"my.other.feature"
,
name
=
"enabled"
,
havingValue
=
"true"
,
matchIfMissing
=
false
)
protected
static
class
MetaAnnotationAndDirectAnnotation
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -33,6 +33,7 @@ import org.springframework.boot.autoconfigure.jndi.TestableInitialContextFactory
import
org.springframework.boot.test.util.EnvironmentTestUtils
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.jmx.export.MBeanExporter
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
...
@@ -167,7 +168,8 @@ public class JndiDataSourceAutoConfigurationTests {
TestableInitialContextFactory
.
bind
(
name
,
dataSource
);
}
private
static
class
MBeanExporterConfiguration
{
@Configuration
static
class
MBeanExporterConfiguration
{
@Bean
MBeanExporter
mbeanExporter
()
{
...
...
@@ -176,7 +178,8 @@ public class JndiDataSourceAutoConfigurationTests {
}
private
static
class
AnotherMBeanExporterConfiguration
{
@Configuration
static
class
AnotherMBeanExporterConfiguration
{
@Bean
MBeanExporter
anotherMbeanExporter
()
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfigurationIntegrationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -29,6 +29,7 @@ import org.junit.Test;
import
org.springframework.boot.test.util.EnvironmentTestUtils
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.kafka.annotation.KafkaListener
;
import
org.springframework.kafka.core.KafkaTemplate
;
import
org.springframework.kafka.support.KafkaHeaders
;
...
...
@@ -98,6 +99,7 @@ public class KafkaAutoConfigurationIntegrationTests {
return
File
.
separatorChar
==
'\\'
;
}
@Configuration
public
static
class
KafkaConfig
{
@Bean
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -324,6 +324,7 @@ public class ResourceServerTokenServicesConfigurationTests {
}
@Configuration
@Import
({
OAuth2RestOperationsConfiguration
.
class
})
protected
static
class
ResourceNoClientConfiguration
extends
ResourceConfiguration
{
...
...
@@ -351,6 +352,7 @@ public class ResourceServerTokenServicesConfigurationTests {
}
@Configuration
@Import
({
FacebookAutoConfiguration
.
class
,
SocialWebAutoConfiguration
.
class
})
protected
static
class
SocialResourceConfiguration
extends
ResourceConfiguration
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/MultipartAutoConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -373,6 +373,7 @@ public class MultipartAutoConfigurationTests {
}
@Configuration
public
static
class
ContainerWithCustomMultipartResolver
{
@Bean
...
...
@@ -382,6 +383,7 @@ public class MultipartAutoConfigurationTests {
}
@Configuration
public
static
class
ContainerWithCommonsMultipartResolver
{
@Bean
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/websocket/WebSocketAutoConfigurationTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -89,6 +89,7 @@ public class WebSocketAutoConfigurationTests {
}
@Configuration
static
class
CommonConfiguration
{
@Bean
...
...
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/remote/client/RemoteClientConfiguration.java
View file @
821ee0cf
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -133,6 +133,7 @@ public class RemoteClientConfiguration {
/**
* LiveReload configuration.
*/
@Configuration
@ConditionalOnProperty
(
prefix
=
"spring.devtools.livereload"
,
name
=
"enabled"
,
matchIfMissing
=
true
)
static
class
LiveReloadConfiguration
{
...
...
@@ -179,6 +180,7 @@ public class RemoteClientConfiguration {
/**
* Client configuration for remote update and restarts.
*/
@Configuration
@ConditionalOnProperty
(
prefix
=
"spring.devtools.remote.restart"
,
name
=
"enabled"
,
matchIfMissing
=
true
)
static
class
RemoteRestartClientConfiguration
{
...
...
@@ -242,6 +244,7 @@ public class RemoteClientConfiguration {
/**
* Client configuration for remote debug HTTP tunneling.
*/
@Configuration
@ConditionalOnProperty
(
prefix
=
"spring.devtools.remote.debug"
,
name
=
"enabled"
,
matchIfMissing
=
true
)
@ConditionalOnClass
(
Filter
.
class
)
@Conditional
(
LocalDebugPortAvailableCondition
.
class
)
...
...
spring-boot-samples/spring-boot-sample-parent-context/src/main/java/sample/parent/SampleParentContextApplication.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.integration.channel.DirectChannel
;
import
org.springframework.integration.dsl.IntegrationFlow
;
import
org.springframework.integration.dsl.IntegrationFlows
;
...
...
@@ -41,6 +42,7 @@ public class SampleParentContextApplication {
.
child
(
SampleParentContextApplication
.
class
).
run
(
args
);
}
@Configuration
@EnableAutoConfiguration
protected
static
class
Parent
{
...
...
spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/json/JsonTestersAutoConfiguration.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -70,8 +70,9 @@ public class JsonTestersAutoConfiguration {
null
);
}
@Configuration
@ConditionalOnClass
(
ObjectMapper
.
class
)
private
static
class
JacksonJsonTestersConfiguration
{
static
class
JacksonJsonTestersConfiguration
{
@Bean
@Scope
(
"prototype"
)
...
...
@@ -84,8 +85,9 @@ public class JsonTestersAutoConfiguration {
}
@Configuration
@ConditionalOnClass
(
Gson
.
class
)
private
static
class
GsonJsonTestersConfiguration
{
static
class
GsonJsonTestersConfiguration
{
@Bean
@Scope
(
"prototype"
)
...
...
spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -242,6 +242,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
return
new
BeanOne
();
}
@org
.
springframework
.
context
.
annotation
.
Configuration
public
static
class
BeanTwoConfiguration
{
@SuppressWarnings
(
"unused"
)
...
...
@@ -255,6 +256,7 @@ public class BeanCurrentlyInCreationFailureAnalyzerTests {
}
@org
.
springframework
.
context
.
annotation
.
Configuration
public
static
class
BeanThreeConfiguration
{
@Bean
...
...
spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/NoUniqueBeanDefinitionFailureAnalyzerTests.java
View file @
821ee0cf
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
9
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -154,6 +154,7 @@ public class NoUniqueBeanDefinitionFailureAnalyzerTests {
}
@Configuration
static
class
ParentProducer
{
@Bean
...
...
spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletContextInitializerBeansTests.java
View file @
821ee0cf
/*
* 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");
* you may not use this file except in compliance with the License.
...
...
@@ -32,6 +32,7 @@ import org.junit.Test;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
...
...
@@ -66,6 +67,7 @@ public class ServletContextInitializerBeansTests {
this
.
context
=
new
AnnotationConfigApplicationContext
(
configuration
);
}
@Configuration
static
class
ServletConfiguration
{
@Bean
...
...
@@ -75,6 +77,7 @@ public class ServletContextInitializerBeansTests {
}
@Configuration
static
class
FilterConfiguration
{
@Bean
...
...
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