Polish
This commit is contained in:
@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
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 Madhura Bhave
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(PersistenceExceptionTranslationPostProcessor.class)
|
||||
public class PersistenceExceptionTranslationAutoConfiguration {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -36,6 +36,7 @@ import org.springframework.core.io.Resource;
|
||||
* @author Vedran Pavic
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(HazelcastClient.class)
|
||||
@ConditionalOnMissingBean(HazelcastInstance.class)
|
||||
class HazelcastClientConfiguration {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -35,6 +35,7 @@ import org.springframework.core.io.Resource;
|
||||
* @author Stephane Nicoll
|
||||
* @author Vedran Pavic
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(HazelcastInstance.class)
|
||||
class HazelcastServerConfiguration {
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ public class IntegrationAutoConfiguration {
|
||||
/**
|
||||
* Integration component scan configuration.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(GatewayProxyFactoryBean.class)
|
||||
@Import(IntegrationAutoConfigurationScanRegistrar.class)
|
||||
protected static class IntegrationComponentScanConfiguration {
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.boot.context.properties.source.MapConfigurationProper
|
||||
import org.springframework.boot.jdbc.DatabaseDriver;
|
||||
import org.springframework.boot.jdbc.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;
|
||||
@@ -51,6 +52,7 @@ import org.springframework.util.StringUtils;
|
||||
* @author Madhura Bhave
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Configuration
|
||||
@AutoConfigureBefore(DataSourceAutoConfiguration.class)
|
||||
@EnableConfigurationProperties(DataSourceProperties.class)
|
||||
@ConditionalOnClass({ DataSource.class, TransactionManager.class,
|
||||
|
||||
@@ -35,6 +35,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
* @author Madhura Bhave
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(WebSecurityConfigurerAdapter.class)
|
||||
@ConditionalOnMissingBean(WebSecurityConfigurerAdapter.class)
|
||||
@ConditionalOnWebApplication(type = Type.SERVLET)
|
||||
|
||||
@@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.security.servlet;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.BeanIds;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
@@ -34,6 +35,7 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
||||
* @author Madhura Bhave
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnBean(WebSecurityConfigurerAdapter.class)
|
||||
@ConditionalOnMissingBean(name = BeanIds.SPRING_SECURITY_FILTER_CHAIN)
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 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.
|
||||
@@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfigura
|
||||
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
@@ -34,6 +35,7 @@ import org.springframework.context.annotation.Import;
|
||||
* @author Phillip Webb
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(javax.transaction.Transaction.class)
|
||||
@ConditionalOnProperty(prefix = "spring.jta", value = "enabled", matchIfMissing = true)
|
||||
@AutoConfigureBefore({ XADataSourceAutoConfiguration.class,
|
||||
|
||||
@@ -43,6 +43,10 @@ import org.springframework.core.env.Environment;
|
||||
@EnableConfigurationProperties(ServerProperties.class)
|
||||
public class EmbeddedWebServerFactoryCustomizerAutoConfiguration {
|
||||
|
||||
/**
|
||||
* Nested configuration if Tomcat is being used.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Tomcat.class, UpgradeProtocol.class })
|
||||
public static class TomcatWebServerFactoryCustomizerConfiguration {
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @author Brian Clozel
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@Configuration
|
||||
class ServletWebServerFactoryConfiguration {
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -44,6 +44,7 @@ import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerCo
|
||||
* @author Andy Wilkinson
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnWebApplication(type = Type.SERVLET)
|
||||
@ConditionalOnClass(WebSocketMessageBrokerConfigurer.class)
|
||||
@AutoConfigureAfter(JacksonAutoConfiguration.class)
|
||||
|
||||
Reference in New Issue
Block a user