Polish formatting
This commit is contained in:
@@ -95,4 +95,5 @@ public abstract class AbstractDependsOnBeanFactoryPostProcessor
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ class AutoConfigurationSorter {
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class AutoConfigurationClass {
|
||||
|
||||
@@ -71,6 +71,7 @@ import org.springframework.retry.support.RetryTemplate;
|
||||
* <li>{@literal spring.rabbitmq.virtualHost} is used to specify the (optional) virtual
|
||||
* host to which the client should connect.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @author Greg Turnquist
|
||||
* @author Josh Long
|
||||
* @author Stephane Nicoll
|
||||
|
||||
@@ -47,12 +47,14 @@ public class AopAutoConfiguration {
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false", matchIfMissing = true)
|
||||
public static class JdkDynamicAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "true", matchIfMissing = false)
|
||||
public static class CglibAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -111,4 +111,5 @@ public class BatchProperties {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ public class CacheAutoConfiguration {
|
||||
* instantiation.
|
||||
*/
|
||||
static class CacheManagerValidatorPostProcessor implements BeanFactoryPostProcessor {
|
||||
|
||||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
||||
throws BeansException {
|
||||
@@ -120,6 +121,7 @@ public class CacheAutoConfiguration {
|
||||
result[result.length - 1] = value;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,6 +143,7 @@ public class CacheAutoConfiguration {
|
||||
+ "be auto-configured, check your configuration (caching "
|
||||
+ "type is '" + this.cacheProperties.getType() + "')");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -67,6 +67,7 @@ abstract class HazelcastInstanceConfiguration {
|
||||
existingHazelcastInstance);
|
||||
return this.customizers.customize(cacheManager);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -159,10 +159,12 @@ class JCacheCacheConfiguration {
|
||||
|
||||
@Conditional(JCacheProviderAvailableCondition.class)
|
||||
static class JCacheProvider {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnSingleCandidate(CacheManager.class)
|
||||
static class CustomJCacheCacheManager {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -264,6 +264,7 @@ public final class ConditionEvaluationReport {
|
||||
public String toString() {
|
||||
return this.condition.getClass() + " " + this.outcome;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class AncestorsMatchedCondition implements Condition {
|
||||
|
||||
@@ -228,8 +228,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Indicate that one or more results were found. For example
|
||||
* {@code found("bean", "beans").items("x", "y")} results in the message
|
||||
* "found beans x, y".
|
||||
* {@code found("bean", "beans").items("x", "y")} results in the message "found
|
||||
* beans x, y".
|
||||
* @param singular the article found in singular form
|
||||
* @param plural the article found in plural form
|
||||
* @return an {@link ItemsBuilder}
|
||||
@@ -240,8 +240,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Indicate that one or more results were not found. For example
|
||||
* {@code didNotFind("bean").items("x")} results in the message
|
||||
* "did not find bean x".
|
||||
* {@code didNotFind("bean").items("x")} results in the message "did not find bean
|
||||
* x".
|
||||
* @param article the article found
|
||||
* @return an {@link ItemsBuilder}
|
||||
*/
|
||||
@@ -251,8 +251,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Indicate that one or more results were found. For example
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message
|
||||
* "did not find beans x, y".
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message "did
|
||||
* not find beans x, y".
|
||||
* @param singular the article found in singular form
|
||||
* @param plural the article found in plural form
|
||||
* @return an {@link ItemsBuilder}
|
||||
@@ -330,8 +330,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Used when no items are available. For example
|
||||
* {@code didNotFind("any beans").atAll()} results in the message
|
||||
* "did not find any beans".
|
||||
* {@code didNotFind("any beans").atAll()} results in the message "did not find
|
||||
* any beans".
|
||||
* @return a built {@link ConditionMessage}
|
||||
*/
|
||||
public ConditionMessage atAll() {
|
||||
@@ -340,8 +340,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Indicate the items. For example
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message
|
||||
* "did not find beans x, y".
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message "did
|
||||
* not find beans x, y".
|
||||
* @param items the items (may be {@code null})
|
||||
* @return a built {@link ConditionMessage}
|
||||
*/
|
||||
@@ -351,8 +351,8 @@ public final class ConditionMessage {
|
||||
|
||||
/**
|
||||
* Indicate the items. For example
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message
|
||||
* "did not find beans x, y".
|
||||
* {@code didNotFind("bean", "beans").items("x", "y")} results in the message "did
|
||||
* not find beans x, y".
|
||||
* @param style the render style
|
||||
* @param items the items (may be {@code null})
|
||||
* @return a built {@link ConditionMessage}
|
||||
|
||||
@@ -35,4 +35,5 @@ import org.springframework.context.annotation.Conditional;
|
||||
@Documented
|
||||
@Conditional(OnWebApplicationCondition.class)
|
||||
public @interface ConditionalOnWebApplication {
|
||||
|
||||
}
|
||||
|
||||
@@ -439,6 +439,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
|
||||
Assert.isTrue(getTypes().size() == 1, annotationName() + " annotations must "
|
||||
+ "specify only one type (got " + getTypes() + ")");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final class BeanTypeDeductionException extends RuntimeException {
|
||||
|
||||
@@ -134,10 +134,12 @@ public class CouchbaseAutoConfiguration {
|
||||
|
||||
@Conditional(OnBootstrapHostsCondition.class)
|
||||
static class BootstrapHostsProperty {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnBean(type = "org.springframework.data.couchbase.config.CouchbaseConfigurer")
|
||||
static class CouchbaseConfigurerAvailable {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ class CassandraRepositoriesAutoConfigureRegistrar
|
||||
|
||||
@EnableCassandraRepositories
|
||||
private static class EnableCassandraRepositoriesConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,5 +51,7 @@ class JpaRepositoriesAutoConfigureRegistrar
|
||||
|
||||
@EnableJpaRepositories
|
||||
private static class EnableJpaRepositoriesConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ class MongoRepositoriesAutoConfigureRegistrar
|
||||
|
||||
@EnableMongoRepositories
|
||||
private static class EnableMongoRepositoriesConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -256,4 +256,5 @@ public class RedisProperties {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -133,4 +133,5 @@ public class FlywayProperties {
|
||||
public boolean isCreateDataSource() {
|
||||
return this.url != null && this.user != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -164,4 +164,5 @@ public class FreeMarkerAutoConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -95,4 +95,5 @@ public class H2ConsoleProperties {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -126,4 +126,5 @@ public class HypermediaAutoConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public class IntegrationAutoConfiguration {
|
||||
@Configuration
|
||||
@EnableIntegration
|
||||
protected static class IntegrationConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -95,6 +95,7 @@ public class DataSourceAutoConfiguration {
|
||||
@ConditionalOnMissingBean({ DataSource.class, XADataSource.class })
|
||||
@Import(EmbeddedDataSourceConfiguration.class)
|
||||
protected static class EmbeddedDatabaseConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -141,10 +142,12 @@ public class DataSourceAutoConfiguration {
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.datasource", name = "type")
|
||||
static class ExplicitType {
|
||||
|
||||
}
|
||||
|
||||
@Conditional(PooledDataSourceAvailableCondition.class)
|
||||
static class PooledDataSourceAvailable {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -178,6 +181,7 @@ public class DataSourceAutoConfiguration {
|
||||
.findType();
|
||||
return (dataSourceClass == null ? null : dataSourceClass.getClassLoader());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,6 +73,7 @@ abstract class DataSourceConfiguration {
|
||||
public HikariDataSource dataSource(DataSourceProperties properties) {
|
||||
return createDataSource(properties, HikariDataSource.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnClass(org.apache.commons.dbcp.BasicDataSource.class)
|
||||
@@ -94,6 +95,7 @@ abstract class DataSourceConfiguration {
|
||||
}
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnClass(org.apache.commons.dbcp2.BasicDataSource.class)
|
||||
@@ -107,6 +109,7 @@ abstract class DataSourceConfiguration {
|
||||
return createDataSource(properties,
|
||||
org.apache.commons.dbcp2.BasicDataSource.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
|
||||
@@ -117,7 +117,6 @@ public enum EmbeddedDatabaseConnection {
|
||||
/**
|
||||
* Convenience method to determine if a given driver class name represents an embedded
|
||||
* database type.
|
||||
*
|
||||
* @param driverClass the driver class
|
||||
* @return true if the driver class is one of the embedded types
|
||||
*/
|
||||
@@ -130,7 +129,6 @@ public enum EmbeddedDatabaseConnection {
|
||||
/**
|
||||
* Convenience method to determine if a given data source represents an embedded
|
||||
* database type.
|
||||
*
|
||||
* @param dataSource the data source to interrogate
|
||||
* @return true if the data source is one of the embedded types
|
||||
*/
|
||||
@@ -186,4 +184,5 @@ public enum EmbeddedDatabaseConnection {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
||||
// will try and register a ContextLoaderListener which we don't need
|
||||
servletContext.setInitParameter("contextConfigLocation", "<NONE>");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnClass(JacksonFeature.class)
|
||||
|
||||
@@ -85,7 +85,9 @@ public class JerseyProperties {
|
||||
}
|
||||
|
||||
public enum Type {
|
||||
|
||||
SERVLET, FILTER
|
||||
|
||||
}
|
||||
|
||||
public static class Filter {
|
||||
|
||||
@@ -85,6 +85,7 @@ class JmsAnnotationDrivenConfiguration {
|
||||
@EnableJms
|
||||
@ConditionalOnMissingBean(name = JmsListenerConfigUtils.JMS_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
protected static class EnableJmsConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnJndi
|
||||
|
||||
@@ -81,6 +81,7 @@ public class JmsAutoConfiguration {
|
||||
return jmsTemplate;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnClass(JmsMessagingTemplate.class)
|
||||
|
||||
@@ -124,6 +124,7 @@ public class JmsProperties {
|
||||
? this.concurrency + "-" + this.maxConcurrency
|
||||
: String.valueOf(this.concurrency));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,6 +165,7 @@ public class JmsProperties {
|
||||
public int getMode() {
|
||||
return this.mode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -95,10 +95,12 @@ public class JndiConnectionFactoryAutoConfiguration {
|
||||
|
||||
@ConditionalOnJndi({ "java:/JmsXA", "java:/XAConnectionFactory" })
|
||||
static class Jndi {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.jms", name = "jndi-name")
|
||||
static class Property {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -87,4 +87,5 @@ class HornetQEmbeddedConfigurationFactory {
|
||||
String tempDirectory = System.getProperty("java.io.tmpdir");
|
||||
return new File(tempDirectory, "hornetq-data").getAbsolutePath();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -215,7 +215,6 @@ public class HornetQProperties {
|
||||
/**
|
||||
* Creates the minimal transport parameters for an embedded transport
|
||||
* configuration.
|
||||
*
|
||||
* @return the transport parameters
|
||||
* @see TransportConstants#SERVER_ID_PROP_NAME
|
||||
*/
|
||||
|
||||
@@ -61,4 +61,5 @@ class HornetQXAConnectionFactoryConfiguration {
|
||||
return new HornetQConnectionFactoryFactory(beanFactory, properties)
|
||||
.createConnectionFactory(SpringBootHornetQConnectionFactory.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ class JooqExceptionTranslator extends DefaultExecuteListener {
|
||||
|
||||
/**
|
||||
* Handle a single exception in the chain. SQLExceptions might be nested multiple
|
||||
* levels deep. The outermost exception is usually the least interesting one (
|
||||
* "Call getNextException to see the cause."). Therefore the innermost exception is
|
||||
* levels deep. The outermost exception is usually the least interesting one ("Call
|
||||
* getNextException to see the cause."). Therefore the innermost exception is
|
||||
* propagated and all other exceptions are logged.
|
||||
* @param context the execute context
|
||||
* @param translator the exception translator
|
||||
|
||||
@@ -122,6 +122,7 @@ public class LiquibaseAutoConfiguration {
|
||||
.username(this.properties.getUser())
|
||||
.password(this.properties.getPassword()).build();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -110,10 +110,12 @@ public class MailSenderAutoConfiguration {
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "host")
|
||||
static class HostProperty {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.mail", name = "jndi-name")
|
||||
static class JndiNameProperty {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -188,7 +188,6 @@ public class MongoProperties {
|
||||
* {@code environment}. If the configured port is zero, the value of the
|
||||
* {@code local.mongo.port} property retrieved from the {@code environment} is used to
|
||||
* configure the client.
|
||||
*
|
||||
* @param options the options
|
||||
* @param environment the environment
|
||||
* @return the Mongo client
|
||||
|
||||
@@ -121,4 +121,5 @@ public class MustacheAutoConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,6 +106,7 @@ class DataSourceInitializedPublisher implements BeanPostProcessor {
|
||||
registry.registerBeanDefinition(BEAN_NAME, beanDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,4 +43,5 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
@AutoConfigureAfter(SecurityAutoConfiguration.class)
|
||||
@EnableWebSecurity
|
||||
public class FallbackWebSecurityAutoConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@@ -171,7 +171,9 @@ public class SecurityProperties implements SecurityPrerequisite {
|
||||
public static class Headers {
|
||||
|
||||
public enum HSTS {
|
||||
|
||||
NONE, DOMAIN, ALL
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -175,6 +175,7 @@ public class SpringBootWebSecurityConfiguration {
|
||||
@Order(SecurityProperties.BASIC_AUTH_ORDER)
|
||||
protected static class ApplicationNoWebSecurityConfigurerAdapter
|
||||
extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
http.requestMatcher(new RequestMatcher() {
|
||||
@@ -184,6 +185,7 @@ public class SpringBootWebSecurityConfiguration {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -173,4 +173,5 @@ public class OAuth2RestOperationsConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -251,6 +251,7 @@ public class ResourceServerProperties implements Validator, BeanFactoryAware {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ public interface UserInfoRestTemplateCustomizer {
|
||||
|
||||
/**
|
||||
* Customize the rest template before it is initialized.
|
||||
*
|
||||
* @param template the rest template
|
||||
*/
|
||||
void customize(OAuth2RestTemplate template);
|
||||
|
||||
@@ -77,11 +77,14 @@ public class SendGridAutoConfiguration {
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.sendgrid", value = "username")
|
||||
static class SendGridUserProperty {
|
||||
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "spring.sendgrid", value = "api-key")
|
||||
static class SendGridApiKeyProperty {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,4 +53,5 @@ class HazelcastSessionConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public class LinkedInAutoConfiguration {
|
||||
return new LinkedInConnectionFactory(this.properties.getAppId(),
|
||||
this.properties.getAppSecret());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ public class SocialWebAutoConfiguration {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -186,4 +187,5 @@ public class SocialWebAutoConfiguration {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,6 +84,7 @@ public class ThymeleafAutoConfiguration {
|
||||
public SpringResourceResourceResolver thymeleafResourceResolver() {
|
||||
return new SpringResourceResourceResolver();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -116,5 +116,7 @@ class BitronixJtaConfiguration {
|
||||
public BitronixXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
|
||||
return new BitronixXAConnectionFactoryWrapper();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -167,4 +167,5 @@ public class DefaultErrorViewResolver implements ErrorViewResolver, Ordered {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,9 @@ public class HttpEncodingProperties {
|
||||
}
|
||||
|
||||
enum Type {
|
||||
|
||||
REQUEST, RESPONSE
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1461,4 +1461,5 @@ public class ServerProperties
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ public class AutoConfigurationReproTests {
|
||||
|
||||
@Configuration
|
||||
public static class Config {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -37,17 +37,29 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
public class AutoConfigurationSorterTests {
|
||||
|
||||
private static final String LOWEST = OrderLowest.class.getName();
|
||||
|
||||
private static final String HIGHEST = OrderHighest.class.getName();
|
||||
|
||||
private static final String A = AutoConfigureA.class.getName();
|
||||
|
||||
private static final String B = AutoConfigureB.class.getName();
|
||||
|
||||
private static final String C = AutoConfigureC.class.getName();
|
||||
|
||||
private static final String D = AutoConfigureD.class.getName();
|
||||
|
||||
private static final String E = AutoConfigureE.class.getName();
|
||||
|
||||
private static final String W = AutoConfigureW.class.getName();
|
||||
|
||||
private static final String X = AutoConfigureX.class.getName();
|
||||
|
||||
private static final String Y = AutoConfigureY.class.getName();
|
||||
|
||||
private static final String Z = AutoConfigureZ.class.getName();
|
||||
|
||||
private static final String A2 = AutoConfigureA2.class.getName();
|
||||
|
||||
private static final String W2 = AutoConfigureW2.class.getName();
|
||||
|
||||
@Rule
|
||||
|
||||
@@ -79,21 +79,25 @@ public class ImportAutoConfigurationTests {
|
||||
|
||||
@Configuration
|
||||
static class ConfigA {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@AutoConfigureAfter(ConfigA.class)
|
||||
static class ConfigB {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@AutoConfigureAfter(ConfigB.class)
|
||||
static class ConfigC {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@AutoConfigureAfter(ConfigC.class)
|
||||
static class ConfigD {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,4 +55,5 @@ public class MessageSourceAutoConfigurationIntegrationTests {
|
||||
protected static class Config {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -204,4 +204,5 @@ public class MessageSourceAutoConfigurationTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -418,10 +418,12 @@ public class RabbitAutoConfigurationTests {
|
||||
|
||||
@Configuration
|
||||
protected static class TestConfiguration2 {
|
||||
|
||||
@Bean
|
||||
ConnectionFactory aDifferentConnectionFactory() {
|
||||
return new CachingConnectionFactory("otherserver", 8001);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -451,6 +453,7 @@ public class RabbitAutoConfigurationTests {
|
||||
messagingTemplate.setDefaultDestination("fooBar");
|
||||
return messagingTemplate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -83,6 +83,7 @@ public class AopAutoConfigurationTests {
|
||||
|
||||
@Configuration
|
||||
protected static class TestConfiguration {
|
||||
|
||||
@Bean
|
||||
public TestAspect aspect() {
|
||||
return new TestAspect();
|
||||
@@ -92,16 +93,20 @@ public class AopAutoConfigurationTests {
|
||||
public TestInterface bean() {
|
||||
return new TestBean();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected static class TestBean implements TestInterface {
|
||||
|
||||
@Override
|
||||
public void foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Aspect
|
||||
protected static class TestAspect {
|
||||
|
||||
private boolean called;
|
||||
|
||||
public boolean isCalled() {
|
||||
@@ -112,6 +117,7 @@ public class AopAutoConfigurationTests {
|
||||
public void before() {
|
||||
this.called = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public interface TestInterface {
|
||||
|
||||
@@ -269,11 +269,13 @@ public class BatchAutoConfigurationTests {
|
||||
|
||||
@Configuration
|
||||
protected static class EmptyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@EnableBatchProcessing
|
||||
@TestAutoConfigurationPackage(City.class)
|
||||
protected static class TestConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@EnableBatchProcessing
|
||||
@@ -281,6 +283,7 @@ public class BatchAutoConfigurationTests {
|
||||
protected static class TestCustomConfiguration implements BatchConfigurer {
|
||||
|
||||
private JobRepository jobRepository;
|
||||
|
||||
private MapJobRepositoryFactoryBean factory = new MapJobRepositoryFactoryBean();
|
||||
|
||||
@Override
|
||||
@@ -311,10 +314,12 @@ public class BatchAutoConfigurationTests {
|
||||
explorer.afterPropertiesSet();
|
||||
return explorer.getObject();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EnableBatchProcessing
|
||||
protected static class NamedJobConfigurationWithRegisteredJob {
|
||||
|
||||
@Autowired
|
||||
private JobRegistry jobRegistry;
|
||||
|
||||
@@ -351,6 +356,7 @@ public class BatchAutoConfigurationTests {
|
||||
job.setJobRepository(this.jobRepository);
|
||||
return job;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EnableBatchProcessing
|
||||
@@ -382,10 +388,12 @@ public class BatchAutoConfigurationTests {
|
||||
job.setJobRepository(this.jobRepository);
|
||||
return job;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@EnableBatchProcessing
|
||||
protected static class JobConfiguration {
|
||||
|
||||
@Autowired
|
||||
private JobRepository jobRepository;
|
||||
|
||||
@@ -412,6 +420,7 @@ public class BatchAutoConfigurationTests {
|
||||
job.setJobRepository(this.jobRepository);
|
||||
return job;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -804,6 +804,7 @@ public class CacheAutoConfigurationTests {
|
||||
@Import({ GenericCacheConfiguration.class,
|
||||
CacheManagerCustomizersConfiguration.class })
|
||||
static class GenericCacheAndCustomizersConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -35,7 +35,6 @@ import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verifyZeroInteractions;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
public class CacheManagerCustomizersTests {
|
||||
@@ -92,4 +91,5 @@ public class CacheManagerCustomizersTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -278,6 +278,7 @@ public class ConditionEvaluationReportTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class TestMatchCondition extends SpringBootCondition
|
||||
|
||||
@@ -160,19 +160,23 @@ public class ConditionalOnBeanTests {
|
||||
@Configuration
|
||||
@ConditionalOnBean(String.class)
|
||||
protected static class OnBeanClassConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnBean(type = "java.lang.String")
|
||||
protected static class OnBeanClassNameConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -111,4 +111,5 @@ public class ConditionalOnClassTests {
|
||||
protected static class CombinedXmlConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,18 +51,23 @@ public class ConditionalOnExpressionTests {
|
||||
@Configuration
|
||||
@ConditionalOnExpression("false")
|
||||
protected static class MissingConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnExpression("true")
|
||||
protected static class BasicConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -174,28 +174,34 @@ public class ConditionalOnJavaTests {
|
||||
@Configuration
|
||||
@ConditionalOnJava(JavaVersion.NINE)
|
||||
static class Java9Required {
|
||||
|
||||
@Bean
|
||||
String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnJava(range = Range.OLDER_THAN, value = JavaVersion.SIX)
|
||||
static class Java5Required {
|
||||
|
||||
@Bean
|
||||
String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnJava(JavaVersion.SIX)
|
||||
static class Java6Required {
|
||||
|
||||
@Bean
|
||||
String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ public class ConditionalOnJndiTests {
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -167,6 +168,7 @@ public class ConditionalOnJndiTests {
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class MockableOnJndi extends OnJndiCondition {
|
||||
@@ -193,6 +195,7 @@ public class ConditionalOnJndiTests {
|
||||
public void setFoundLocation(String foundLocation) {
|
||||
this.foundLocation = foundLocation;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -423,6 +423,7 @@ public class ConditionalOnMissingBeanTests {
|
||||
@Configuration
|
||||
@Import(FactoryBeanRegistrar.class)
|
||||
protected static class RegisteredFactoryBeanConfiguration {
|
||||
|
||||
}
|
||||
|
||||
protected static class FactoryBeanRegistrar implements ImportBeanDefinitionRegistrar {
|
||||
@@ -621,4 +622,5 @@ public class ConditionalOnMissingBeanTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,27 +52,33 @@ public class ConditionalOnMissingClassTests {
|
||||
@Configuration
|
||||
@ConditionalOnMissingClass("org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClassTests")
|
||||
protected static class BasicConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnMissingClass("FOO")
|
||||
protected static class MissingConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
protected static class FooConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -51,18 +51,23 @@ public class ConditionalOnNotWebApplicationTests {
|
||||
@Configuration
|
||||
@ConditionalOnWebApplication
|
||||
protected static class MissingConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnNotWebApplication
|
||||
protected static class BasicConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -461,4 +461,5 @@ public class ConditionalOnPropertyTests {
|
||||
public @interface ConditionalOnMyFeature {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,27 +61,34 @@ public class ConditionalOnResourceTests {
|
||||
@Configuration
|
||||
@ConditionalOnResource(resources = "foo")
|
||||
protected static class MissingConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnResource(resources = "schema.sql")
|
||||
protected static class BasicConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnResource(resources = "${schema}")
|
||||
protected static class PlaceholderConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -240,4 +240,5 @@ public class ConditionalOnSingleCandidateTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,18 +54,23 @@ public class ConditionalOnWebApplicationTests {
|
||||
@Configuration
|
||||
@ConditionalOnNotWebApplication
|
||||
protected static class MissingConfiguration {
|
||||
|
||||
@Bean
|
||||
public String bar() {
|
||||
return "bar";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnWebApplication
|
||||
protected static class BasicConfiguration {
|
||||
|
||||
@Bean
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ public class ResourceConditionTests {
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -89,6 +90,7 @@ public class ResourceConditionTests {
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class DefaultLocationResourceCondition extends ResourceCondition {
|
||||
@@ -96,6 +98,7 @@ public class ResourceConditionTests {
|
||||
DefaultLocationResourceCondition() {
|
||||
super("test", "spring.foo.test.", "config", "classpath:/logging.properties");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class UnknownDefaultLocationResourceCondition
|
||||
@@ -107,4 +110,5 @@ public class ResourceConditionTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ public class ConfigurationPropertiesAutoConfigurationTests {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ public class CouchbaseTestServer implements TestRule {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class SkipStatement extends Statement {
|
||||
|
||||
@@ -99,6 +99,7 @@ public class PersistenceExceptionTranslationAutoConfigurationTests {
|
||||
public TestRepository testRepository(EntityManagerFactory entityManagerFactory) {
|
||||
return new TestRepository(entityManagerFactory.createEntityManager());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Repository
|
||||
@@ -113,6 +114,7 @@ public class PersistenceExceptionTranslationAutoConfigurationTests {
|
||||
public void doSomething() {
|
||||
this.entityManager.persist(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,4 +23,5 @@ import org.springframework.data.repository.Repository;
|
||||
* @author Eddú Meléndez
|
||||
*/
|
||||
public interface CityCouchbaseRepository extends Repository<City, Long> {
|
||||
|
||||
}
|
||||
|
||||
@@ -81,4 +81,5 @@ public class City {
|
||||
public void setMap(String map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -110,4 +110,5 @@ public class ElasticsearchRepositoriesAutoConfigurationTests {
|
||||
protected static class CustomizedConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,4 +66,5 @@ public class City implements Serializable {
|
||||
public String toString() {
|
||||
return getName() + "," + getState() + "," + getCountry();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,4 +112,5 @@ public class JpaRepositoriesAutoConfigurationTests {
|
||||
protected static class SortOfInvalidCustomConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,4 +73,5 @@ public class City implements Serializable {
|
||||
public String toString() {
|
||||
return getName() + "," + getState() + "," + getCountry();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -210,6 +210,7 @@ public class MixedMongoRepositoriesAutoConfigurationTests {
|
||||
}
|
||||
return names.toArray(new String[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@ public class MongoDataAutoConfigurationTests {
|
||||
public CustomConversions customConversions() {
|
||||
return new CustomConversions(Arrays.asList(new MyConverter()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -223,4 +224,5 @@ public class MongoDataAutoConfigurationTests {
|
||||
LocalDateTime date;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -127,4 +127,5 @@ public class MongoRepositoriesAutoConfigurationTests {
|
||||
protected static class SortOfInvalidCustomConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,4 +74,5 @@ public class City implements Serializable {
|
||||
public String toString() {
|
||||
return getName() + "," + getState() + "," + getCountry();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,4 +52,5 @@ public class Country implements Serializable {
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ public class MixedNeo4jRepositoriesAutoConfigurationTests {
|
||||
}
|
||||
return names.toArray(new String[names.size()]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -111,5 +111,7 @@ public class SolrRepositoriesAutoConfigurationTests {
|
||||
// To not find any repositories
|
||||
@EnableSolrRepositories("foo.bar")
|
||||
protected static class SortOfInvalidCustomConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ import org.springframework.data.repository.Repository;
|
||||
public interface CityRepository extends Repository<City, String> {
|
||||
|
||||
Page<City> findByNameStartingWith(String name, Pageable page);
|
||||
|
||||
}
|
||||
|
||||
@@ -269,6 +269,7 @@ public class FlywayAutoConfigurationTests {
|
||||
initializer.setOrder(Ordered.HIGHEST_PRECEDENCE);
|
||||
return initializer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -310,6 +311,7 @@ public class FlywayAutoConfigurationTests {
|
||||
public void assertCalled() {
|
||||
assertThat(this.called).isTrue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -456,6 +456,7 @@ public class JacksonAutoConfigurationTests {
|
||||
public MyDateFormat() {
|
||||
super("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@@ -568,6 +569,7 @@ public class JacksonAutoConfigurationTests {
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@JsonComponent
|
||||
|
||||
@@ -76,6 +76,7 @@ public class DataSourceJsonSerializationTests {
|
||||
|
||||
@JsonSerialize(using = TomcatDataSourceSerializer.class)
|
||||
protected interface DataSourceJson {
|
||||
|
||||
}
|
||||
|
||||
protected static class TomcatDataSourceSerializer extends JsonSerializer<DataSource> {
|
||||
|
||||
@@ -148,6 +148,7 @@ public class JndiDataSourceAutoConfigurationTests {
|
||||
MBeanExporter mbeanExporter() {
|
||||
return new MBeanExporter();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user