parent
0d8613f3eb
commit
2ff74b1559
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -55,14 +55,16 @@ public class AuditAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnClass(name = "org.springframework.security.authentication.event.AbstractAuthenticationEvent")
|
||||
@ConditionalOnClass(
|
||||
name = "org.springframework.security.authentication.event.AbstractAuthenticationEvent")
|
||||
@ConditionalOnMissingBean(AbstractAuthenticationAuditListener.class)
|
||||
public AuthenticationAuditListener authenticationAuditListener() throws Exception {
|
||||
return new AuthenticationAuditListener();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnClass(name = "org.springframework.security.access.event.AbstractAuthorizationEvent")
|
||||
@ConditionalOnClass(
|
||||
name = "org.springframework.security.access.event.AbstractAuthorizationEvent")
|
||||
@ConditionalOnMissingBean(AbstractAuthorizationAuditListener.class)
|
||||
public AuthorizationAuditListener authorizationAuditListener() throws Exception {
|
||||
return new AuthorizationAuditListener();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -160,7 +160,8 @@ public class CrshAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "simple", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type",
|
||||
havingValue = "simple", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
|
||||
public SimpleAuthenticationProperties simpleAuthenticationProperties() {
|
||||
return new SimpleAuthenticationProperties();
|
||||
|
@ -172,7 +173,8 @@ public class CrshAutoConfiguration {
|
|||
* Class to configure CRaSH to authenticate against Spring Security.
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "spring", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "spring",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnBean(AuthenticationManager.class)
|
||||
@Deprecated
|
||||
public static class AuthenticationManagerAdapterConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -251,7 +251,8 @@ public class EndpointWebMvcAutoConfiguration
|
|||
// Put Servlets and Filters in their own nested class so they don't force early
|
||||
// instantiation of ManagementServerProperties.
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "management", name = "add-application-context-header", matchIfMissing = true, havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "management", name = "add-application-context-header",
|
||||
matchIfMissing = true, havingValue = "true")
|
||||
protected static class ApplicationContextFilterConfiguration {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -152,7 +152,8 @@ public class EndpointWebMvcChildContextConfiguration {
|
|||
|
||||
@Configuration
|
||||
@ConditionalOnClass({ EnableWebSecurity.class, Filter.class })
|
||||
@ConditionalOnBean(name = "springSecurityFilterChain", search = SearchStrategy.ANCESTORS)
|
||||
@ConditionalOnBean(name = "springSecurityFilterChain",
|
||||
search = SearchStrategy.ANCESTORS)
|
||||
public static class EndpointWebMvcChildContextSecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -126,7 +126,8 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration {
|
|||
@Bean
|
||||
@ConditionalOnBean(DocsMvcEndpoint.class)
|
||||
@ConditionalOnMissingBean(CurieProvider.class)
|
||||
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "enabled", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "endpoints.docs.curies", name = "enabled",
|
||||
matchIfMissing = false)
|
||||
public DefaultCurieProvider curieProvider(ServerProperties server,
|
||||
ManagementServerProperties management, DocsMvcEndpoint endpoint) {
|
||||
String path = management.getContextPath() + endpoint.getPath()
|
||||
|
@ -140,7 +141,8 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration {
|
|||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnEnabledEndpoint("docs")
|
||||
@ConditionalOnResource(resources = "classpath:/META-INF/resources/spring-boot-actuator/docs/index.html")
|
||||
@ConditionalOnResource(
|
||||
resources = "classpath:/META-INF/resources/spring-boot-actuator/docs/index.html")
|
||||
public DocsMvcEndpoint docsMvcEndpoint(
|
||||
ManagementServletContext managementServletContext) {
|
||||
return new DocsMvcEndpoint(managementServletContext);
|
||||
|
@ -225,7 +227,8 @@ public class EndpointWebMvcHypermediaManagementContextConfiguration {
|
|||
* could not be enhanced (e.g. "/env/{name}") because their values are "primitive" are
|
||||
* ignored.
|
||||
*/
|
||||
@ConditionalOnProperty(prefix = "endpoints.hypermedia", name = "enabled", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "endpoints.hypermedia", name = "enabled",
|
||||
matchIfMissing = false)
|
||||
@ControllerAdvice(assignableTypes = MvcEndpoint.class)
|
||||
static class MvcEndpointAdvice implements ResponseBodyAdvice<Object> {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -48,7 +48,8 @@ public class ManagementServerPropertiesAutoConfiguration {
|
|||
// In case security auto configuration hasn't been included
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnClass(name = "org.springframework.security.config.annotation.web.configuration.EnableWebSecurity")
|
||||
@ConditionalOnClass(
|
||||
name = "org.springframework.security.config.annotation.web.configuration.EnableWebSecurity")
|
||||
public SecurityProperties securityProperties() {
|
||||
return new SecurityProperties();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -188,7 +188,8 @@ public class ManagementWebSecurityAutoConfiguration {
|
|||
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean({ ManagementWebSecurityConfigurerAdapter.class })
|
||||
@ConditionalOnProperty(prefix = "management.security", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "management.security", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@Order(ManagementServerProperties.BASIC_AUTH_ORDER)
|
||||
protected static class ManagementWebSecurityConfigurerAdapter
|
||||
extends WebSecurityConfigurerAdapter {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -46,7 +46,8 @@ import org.springframework.web.servlet.HandlerMapping;
|
|||
@ConditionalOnClass({ Servlet.class, ServletRegistration.class,
|
||||
OncePerRequestFilter.class, HandlerMapping.class })
|
||||
@AutoConfigureAfter(MetricRepositoryAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "endpoints.metrics.filter", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "endpoints.metrics.filter", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@EnableConfigurationProperties({ MetricFilterProperties.class })
|
||||
public class MetricFilterAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -152,7 +152,9 @@ public class PublicMetricsAutoConfiguration {
|
|||
static class IntegrationMetricsConfiguration {
|
||||
|
||||
@Bean(name = IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME)
|
||||
@ConditionalOnMissingBean(value = IntegrationManagementConfigurer.class, name = IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = IntegrationManagementConfigurer.class,
|
||||
name = IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public IntegrationManagementConfigurer managementConfigurer() {
|
||||
IntegrationManagementConfigurer configurer = new IntegrationManagementConfigurer();
|
||||
configurer.setDefaultCountsEnabled(true);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -40,7 +40,8 @@ import org.springframework.util.StringUtils;
|
|||
* @author Stephane Nicoll
|
||||
* @deprecated as of 1.5 since CRaSH is not actively maintained
|
||||
*/
|
||||
@ConfigurationProperties(prefix = ShellProperties.SHELL_PREFIX, ignoreUnknownFields = true)
|
||||
@ConfigurationProperties(prefix = ShellProperties.SHELL_PREFIX,
|
||||
ignoreUnknownFields = true)
|
||||
@Deprecated
|
||||
public class ShellProperties {
|
||||
|
||||
|
@ -378,8 +379,8 @@ public class ShellProperties {
|
|||
/**
|
||||
* Auth specific properties for JAAS authentication.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX
|
||||
+ ".auth.jaas", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX + ".auth.jaas",
|
||||
ignoreUnknownFields = false)
|
||||
public static class JaasAuthenticationProperties
|
||||
extends CrshShellAuthenticationProperties {
|
||||
|
||||
|
@ -408,8 +409,8 @@ public class ShellProperties {
|
|||
/**
|
||||
* Auth specific properties for key authentication.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX
|
||||
+ ".auth.key", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX + ".auth.key",
|
||||
ignoreUnknownFields = false)
|
||||
public static class KeyAuthenticationProperties
|
||||
extends CrshShellAuthenticationProperties {
|
||||
|
||||
|
@ -440,8 +441,8 @@ public class ShellProperties {
|
|||
/**
|
||||
* Auth specific properties for simple authentication.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX
|
||||
+ ".auth.simple", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX + ".auth.simple",
|
||||
ignoreUnknownFields = false)
|
||||
public static class SimpleAuthenticationProperties
|
||||
extends CrshShellAuthenticationProperties {
|
||||
|
||||
|
@ -517,8 +518,8 @@ public class ShellProperties {
|
|||
/**
|
||||
* Auth specific properties for Spring authentication.
|
||||
*/
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX
|
||||
+ ".auth.spring", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = SHELL_PREFIX + ".auth.spring",
|
||||
ignoreUnknownFields = false)
|
||||
public static class SpringAuthenticationProperties
|
||||
extends CrshShellAuthenticationProperties {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -44,7 +44,8 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||
@Configuration
|
||||
@ConditionalOnClass({ Servlet.class, DispatcherServlet.class, ServletRegistration.class })
|
||||
@AutoConfigureAfter(TraceRepositoryAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "endpoints.trace.filter", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "endpoints.trace.filter", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@EnableConfigurationProperties(TraceProperties.class)
|
||||
public class TraceWebFilterAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -50,7 +50,8 @@ import org.springframework.web.servlet.HandlerInterceptor;
|
|||
* @since 1.5.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnBean(MvcEndpoints.class)
|
||||
@AutoConfigureAfter(EndpointWebMvcAutoConfiguration.class)
|
||||
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -48,21 +48,24 @@ public class AuditEventsJmxEndpoint extends AbstractJmxEndpoint {
|
|||
this.auditEventRepository = auditEventRepository;
|
||||
}
|
||||
|
||||
@ManagedOperation(description = "Retrieves a list of audit events meeting the given criteria")
|
||||
@ManagedOperation(
|
||||
description = "Retrieves a list of audit events meeting the given criteria")
|
||||
public Object getData(String dateAfter) {
|
||||
List<AuditEvent> auditEvents = this.auditEventRepository
|
||||
.find(parseDate(dateAfter));
|
||||
return convert(auditEvents);
|
||||
}
|
||||
|
||||
@ManagedOperation(description = "Retrieves a list of audit events meeting the given criteria")
|
||||
@ManagedOperation(
|
||||
description = "Retrieves a list of audit events meeting the given criteria")
|
||||
public Object getData(String dateAfter, String principal) {
|
||||
List<AuditEvent> auditEvents = this.auditEventRepository.find(principal,
|
||||
parseDate(dateAfter));
|
||||
return convert(auditEvents);
|
||||
}
|
||||
|
||||
@ManagedOperation(description = "Retrieves a list of audit events meeting the given criteria")
|
||||
@ManagedOperation(
|
||||
description = "Retrieves a list of audit events meeting the given criteria")
|
||||
public Object getData(String principal, String dateAfter, String type) {
|
||||
List<AuditEvent> auditEvents = this.auditEventRepository.find(principal,
|
||||
parseDate(dateAfter), type);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -64,7 +64,8 @@ public abstract class EndpointMBean implements JmxEndpoint {
|
|||
return this.endpoint.isEnabled();
|
||||
}
|
||||
|
||||
@ManagedAttribute(description = "Indicates whether the underlying endpoint exposes sensitive information")
|
||||
@ManagedAttribute(
|
||||
description = "Indicates whether the underlying endpoint exposes sensitive information")
|
||||
public boolean isSensitive() {
|
||||
return this.endpoint.isSensitive();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -37,9 +37,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@RequestMapping(method = RequestMethod.GET, produces = {
|
||||
ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@RequestMapping(method = RequestMethod.GET,
|
||||
produces = { ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@interface ActuatorGetMapping {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -39,10 +39,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@RequestMapping(method = RequestMethod.POST, consumes = {
|
||||
ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE }, produces = {
|
||||
ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
@RequestMapping(method = RequestMethod.POST,
|
||||
consumes = { ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE },
|
||||
produces = { ActuatorMediaTypes.APPLICATION_ACTUATOR_V1_JSON_VALUE,
|
||||
MediaType.APPLICATION_JSON_VALUE })
|
||||
@interface ActuatorPostMapping {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -51,7 +51,8 @@ public class AuditEventsMvcEndpoint extends AbstractNamedMvcEndpoint {
|
|||
@ResponseBody
|
||||
public ResponseEntity<?> findByPrincipalAndAfterAndType(
|
||||
@RequestParam(required = false) String principal,
|
||||
@RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssZ") Date after,
|
||||
@RequestParam(required = false) @DateTimeFormat(
|
||||
pattern = "yyyy-MM-dd'T'HH:mm:ssZ") Date after,
|
||||
@RequestParam(required = false) String type) {
|
||||
if (!isEnabled()) {
|
||||
return DISABLED_RESPONSE;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -73,7 +73,8 @@ public class HeapdumpMvcEndpoint extends AbstractNamedMvcEndpoint {
|
|||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
@RequestMapping(method = RequestMethod.GET,
|
||||
produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
|
||||
public void invoke(@RequestParam(defaultValue = "true") boolean live,
|
||||
HttpServletRequest request, HttpServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -28,7 +28,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @author Andy Wilkinson
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "management.health.elasticsearch", ignoreUnknownFields = false)
|
||||
@ConfigurationProperties(prefix = "management.health.elasticsearch",
|
||||
ignoreUnknownFields = false)
|
||||
public class ElasticsearchHealthIndicatorProperties {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -68,7 +68,8 @@ public class SpringApplicationHierarchyTests {
|
|||
CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class,
|
||||
MongoDataAutoConfiguration.class, Neo4jDataAutoConfiguration.class,
|
||||
Neo4jRepositoriesAutoConfiguration.class, RedisAutoConfiguration.class,
|
||||
RedisRepositoriesAutoConfiguration.class }, excludeName = {
|
||||
RedisRepositoriesAutoConfiguration.class },
|
||||
excludeName = {
|
||||
"org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration" })
|
||||
public static class Child {
|
||||
|
||||
|
@ -81,7 +82,8 @@ public class SpringApplicationHierarchyTests {
|
|||
CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class,
|
||||
MongoDataAutoConfiguration.class, Neo4jDataAutoConfiguration.class,
|
||||
Neo4jRepositoriesAutoConfiguration.class, RedisAutoConfiguration.class,
|
||||
RedisRepositoriesAutoConfiguration.class }, excludeName = {
|
||||
RedisRepositoriesAutoConfiguration.class },
|
||||
excludeName = {
|
||||
"org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration" })
|
||||
public static class Parent {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -50,8 +50,8 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
|
|||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"server.contextPath=/spring" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "server.contextPath=/spring" })
|
||||
@DirtiesContext
|
||||
public class HalBrowserMvcEndpointServerContextPathIntegrationTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -50,8 +50,8 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
|
|||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"management.port=0" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "management.port=0" })
|
||||
@DirtiesContext
|
||||
public class HalBrowserMvcEndpointServerPortIntegrationTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -50,8 +50,8 @@ import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
|
|||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"server.servlet-path=/spring" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "server.servlet-path=/spring" })
|
||||
@DirtiesContext
|
||||
public class HalBrowserMvcEndpointServerServletPathIntegrationTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -59,8 +59,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
|||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
@TestPropertySource(properties = "management.security.enabled=false")
|
||||
@ContextConfiguration(classes = {
|
||||
Config.class }, initializers = ContextPathListener.class)
|
||||
@ContextConfiguration(classes = { Config.class },
|
||||
initializers = ContextPathListener.class)
|
||||
@DirtiesContext
|
||||
public class JolokiaMvcEndpointContextPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -51,7 +51,8 @@ import org.springframework.core.annotation.AliasFor;
|
|||
@EnableAutoConfiguration
|
||||
@ComponentScan(excludeFilters = {
|
||||
@Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
|
||||
@Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class) })
|
||||
@Filter(type = FilterType.CUSTOM,
|
||||
classes = AutoConfigurationExcludeFilter.class) })
|
||||
public @interface SpringBootApplication {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -43,7 +43,8 @@ import org.springframework.jmx.export.MBeanExporter;
|
|||
*/
|
||||
@Configuration
|
||||
@AutoConfigureAfter(JmxAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.application.admin", value = "enabled", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "spring.application.admin", value = "enabled",
|
||||
havingValue = "true", matchIfMissing = false)
|
||||
public class SpringApplicationAdminJmxAutoConfiguration {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -74,7 +74,8 @@ class RabbitAnnotationDrivenConfiguration {
|
|||
}
|
||||
|
||||
@EnableRabbit
|
||||
@ConditionalOnMissingBean(name = RabbitListenerConfigUtils.RABBIT_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
@ConditionalOnMissingBean(
|
||||
name = RabbitListenerConfigUtils.RABBIT_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
protected static class EnableRabbitConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -223,7 +223,8 @@ public class RabbitAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnSingleCandidate(ConnectionFactory.class)
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic",
|
||||
matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(AmqpAdmin.class)
|
||||
public AmqpAdmin amqpAdmin(ConnectionFactory connectionFactory) {
|
||||
return new RabbitAdmin(connectionFactory);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -497,7 +497,8 @@ public class RabbitProperties {
|
|||
@NestedConfigurationProperty
|
||||
private final AmqpContainer simple = new AmqpContainer();
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.auto-startup")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.auto-startup")
|
||||
@Deprecated
|
||||
public boolean isAutoStartup() {
|
||||
return getSimple().isAutoStartup();
|
||||
|
@ -508,7 +509,8 @@ public class RabbitProperties {
|
|||
getSimple().setAutoStartup(autoStartup);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.acknowledge-mode")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.acknowledge-mode")
|
||||
@Deprecated
|
||||
public AcknowledgeMode getAcknowledgeMode() {
|
||||
return getSimple().getAcknowledgeMode();
|
||||
|
@ -519,7 +521,8 @@ public class RabbitProperties {
|
|||
getSimple().setAcknowledgeMode(acknowledgeMode);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.concurrency")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.concurrency")
|
||||
@Deprecated
|
||||
public Integer getConcurrency() {
|
||||
return getSimple().getConcurrency();
|
||||
|
@ -530,7 +533,8 @@ public class RabbitProperties {
|
|||
getSimple().setConcurrency(concurrency);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.max-concurrency")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.max-concurrency")
|
||||
@Deprecated
|
||||
public Integer getMaxConcurrency() {
|
||||
return getSimple().getMaxConcurrency();
|
||||
|
@ -541,7 +545,8 @@ public class RabbitProperties {
|
|||
getSimple().setMaxConcurrency(maxConcurrency);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.prefetch")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.prefetch")
|
||||
@Deprecated
|
||||
public Integer getPrefetch() {
|
||||
return getSimple().getPrefetch();
|
||||
|
@ -552,7 +557,8 @@ public class RabbitProperties {
|
|||
getSimple().setPrefetch(prefetch);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.transaction-size")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.transaction-size")
|
||||
@Deprecated
|
||||
public Integer getTransactionSize() {
|
||||
return getSimple().getTransactionSize();
|
||||
|
@ -563,7 +569,8 @@ public class RabbitProperties {
|
|||
getSimple().setTransactionSize(transactionSize);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.default-requeue-rejected")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.default-requeue-rejected")
|
||||
@Deprecated
|
||||
public Boolean getDefaultRequeueRejected() {
|
||||
return getSimple().getDefaultRequeueRejected();
|
||||
|
@ -574,7 +581,8 @@ public class RabbitProperties {
|
|||
getSimple().setDefaultRequeueRejected(defaultRequeueRejected);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.idle-event-interval")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.idle-event-interval")
|
||||
@Deprecated
|
||||
public Long getIdleEventInterval() {
|
||||
return getSimple().getIdleEventInterval();
|
||||
|
@ -585,7 +593,8 @@ public class RabbitProperties {
|
|||
getSimple().setIdleEventInterval(idleEventInterval);
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.rabbitmq.listener.simple.retry")
|
||||
@DeprecatedConfigurationProperty(
|
||||
replacement = "spring.rabbitmq.listener.simple.retry")
|
||||
@Deprecated
|
||||
public ListenerRetry getRetry() {
|
||||
return getSimple().getRetry();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -40,19 +40,22 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ EnableAspectJAutoProxy.class, Aspect.class, Advice.class })
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "auto", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "auto", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
public class AopAutoConfiguration {
|
||||
|
||||
@Configuration
|
||||
@EnableAspectJAutoProxy(proxyTargetClass = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false", matchIfMissing = true)
|
||||
@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)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class",
|
||||
havingValue = "true", matchIfMissing = false)
|
||||
public static class CglibAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -88,7 +88,8 @@ public class BatchAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnProperty(prefix = "spring.batch.job", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.batch.job", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
public JobLauncherCommandLineRunner jobLauncherCommandLineRunner(
|
||||
JobLauncher jobLauncher, JobExplorer jobExplorer) {
|
||||
JobLauncherCommandLineRunner runner = new JobLauncherCommandLineRunner(
|
||||
|
@ -137,7 +138,8 @@ public class BatchAutoConfiguration {
|
|||
}
|
||||
|
||||
@EnableConfigurationProperties(BatchProperties.class)
|
||||
@ConditionalOnClass(value = PlatformTransactionManager.class, name = "javax.persistence.EntityManagerFactory")
|
||||
@ConditionalOnClass(value = PlatformTransactionManager.class,
|
||||
name = "javax.persistence.EntityManagerFactory")
|
||||
@ConditionalOnMissingBean(BatchConfigurer.class)
|
||||
@Configuration
|
||||
protected static class JpaBatchConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -202,7 +202,8 @@ public class CacheProperties {
|
|||
*/
|
||||
private Resource config;
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.hazelcast.config", reason = "Use general hazelcast auto-configuration instead.")
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.hazelcast.config",
|
||||
reason = "Use general hazelcast auto-configuration instead.")
|
||||
@Deprecated
|
||||
public Resource getConfig() {
|
||||
return this.config;
|
||||
|
@ -282,7 +283,9 @@ public class CacheProperties {
|
|||
private String spec;
|
||||
|
||||
@Deprecated
|
||||
@DeprecatedConfigurationProperty(reason = "Caffeine will supersede the Guava support in Spring Boot 2.0", replacement = "spring.cache.caffeine.spec")
|
||||
@DeprecatedConfigurationProperty(
|
||||
reason = "Caffeine will supersede the Guava support in Spring Boot 2.0",
|
||||
replacement = "spring.cache.caffeine.spec")
|
||||
public String getSpec() {
|
||||
return this.spec;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -50,7 +50,8 @@ import org.springframework.core.Ordered;
|
|||
@AutoConfigureOrder(CloudAutoConfiguration.ORDER)
|
||||
@ConditionalOnClass(CloudScanConfiguration.class)
|
||||
@ConditionalOnMissingBean(Cloud.class)
|
||||
@ConditionalOnProperty(prefix = "spring.cloud", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.cloud", name = "enabled", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@Import(CloudScanConfiguration.class)
|
||||
public class CloudAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -49,7 +49,8 @@ import org.springframework.context.annotation.Primary;
|
|||
public class CouchbaseAutoConfiguration {
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnMissingBean(value = CouchbaseConfiguration.class, type = "org.springframework.data.couchbase.config.CouchbaseConfigurer")
|
||||
@ConditionalOnMissingBean(value = CouchbaseConfiguration.class,
|
||||
type = "org.springframework.data.couchbase.config.CouchbaseConfigurer")
|
||||
public static class CouchbaseConfiguration {
|
||||
|
||||
private final CouchbaseProperties properties;
|
||||
|
@ -139,7 +140,8 @@ public class CouchbaseAutoConfiguration {
|
|||
|
||||
}
|
||||
|
||||
@ConditionalOnBean(type = "org.springframework.data.couchbase.config.CouchbaseConfigurer")
|
||||
@ConditionalOnBean(
|
||||
type = "org.springframework.data.couchbase.config.CouchbaseConfigurer")
|
||||
static class CouchbaseConfigurerAvailable {
|
||||
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ public class PersistenceExceptionTranslationAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(PersistenceExceptionTranslationPostProcessor.class)
|
||||
@ConditionalOnProperty(prefix = "spring.dao.exceptiontranslation", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.dao.exceptiontranslation", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
public static PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor(
|
||||
Environment environment) {
|
||||
PersistenceExceptionTranslationPostProcessor postProcessor = new PersistenceExceptionTranslationPostProcessor();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -38,7 +38,8 @@ import org.springframework.data.cassandra.repository.support.CassandraRepository
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Session.class, CassandraRepository.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.cassandra.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.cassandra.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(CassandraRepositoryFactoryBean.class)
|
||||
@Import(CassandraRepositoriesAutoConfigureRegistrar.class)
|
||||
public class CassandraRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -40,7 +40,8 @@ import org.springframework.data.couchbase.repository.support.CouchbaseRepository
|
|||
@Configuration
|
||||
@ConditionalOnClass({ Bucket.class, CouchbaseRepository.class })
|
||||
@ConditionalOnBean(RepositoryOperationsMapping.class)
|
||||
@ConditionalOnProperty(prefix = "spring.data.couchbase.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.couchbase.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(CouchbaseRepositoryFactoryBean.class)
|
||||
@Import(CouchbaseRepositoriesRegistrar.class)
|
||||
public class CouchbaseRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -39,7 +39,8 @@ import org.springframework.data.elasticsearch.repository.support.ElasticsearchRe
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Client.class, ElasticsearchRepository.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.elasticsearch.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.elasticsearch.repositories",
|
||||
name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(ElasticsearchRepositoryFactoryBean.class)
|
||||
@Import(ElasticsearchRepositoriesRegistrar.class)
|
||||
public class ElasticsearchRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2013 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -56,7 +56,8 @@ import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
|
|||
@ConditionalOnClass(JpaRepository.class)
|
||||
@ConditionalOnMissingBean({ JpaRepositoryFactoryBean.class,
|
||||
JpaRepositoryConfigExtension.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.jpa.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.jpa.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@Import(JpaRepositoriesAutoConfigureRegistrar.class)
|
||||
@AutoConfigureAfter(HibernateJpaAutoConfiguration.class)
|
||||
public class JpaRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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,7 +35,8 @@ import org.springframework.data.ldap.repository.support.LdapRepositoryFactoryBea
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ LdapContext.class, LdapRepository.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.ldap.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.ldap.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(LdapRepositoryFactoryBean.class)
|
||||
@Import(LdapRepositoriesRegistrar.class)
|
||||
public class LdapRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -55,7 +55,8 @@ import org.springframework.data.mongodb.repository.support.MongoRepositoryFactor
|
|||
@ConditionalOnClass({ MongoClient.class, MongoRepository.class })
|
||||
@ConditionalOnMissingBean({ MongoRepositoryFactoryBean.class,
|
||||
MongoRepositoryConfigurationExtension.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.mongodb.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.mongodb.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@Import(MongoRepositoriesAutoConfigureRegistrar.class)
|
||||
@AutoConfigureAfter(MongoDataAutoConfiguration.class)
|
||||
public class MongoRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -118,7 +118,8 @@ public class Neo4jDataAutoConfiguration {
|
|||
@ConditionalOnClass({ WebMvcConfigurerAdapter.class,
|
||||
OpenSessionInViewInterceptor.class })
|
||||
@ConditionalOnMissingBean(OpenSessionInViewInterceptor.class)
|
||||
@ConditionalOnProperty(prefix = "spring.data.neo4j", name = "open-in-view", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.neo4j", name = "open-in-view",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
protected static class Neo4jWebConfiguration {
|
||||
|
||||
@Configuration
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -52,7 +52,8 @@ import org.springframework.data.neo4j.repository.support.Neo4jRepositoryFactoryB
|
|||
@ConditionalOnClass({ Neo4jSession.class, GraphRepository.class })
|
||||
@ConditionalOnMissingBean({ Neo4jRepositoryFactoryBean.class,
|
||||
Neo4jRepositoryConfigurationExtension.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.neo4j.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.neo4j.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@Import(Neo4jRepositoriesAutoConfigureRegistrar.class)
|
||||
@AutoConfigureAfter(Neo4jDataAutoConfiguration.class)
|
||||
public class Neo4jRepositoriesAutoConfiguration {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -38,7 +38,8 @@ import org.springframework.data.redis.repository.support.RedisRepositoryFactoryB
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Jedis.class, EnableRedisRepositories.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.redis.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.redis.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(RedisRepositoryFactoryBean.class)
|
||||
@Import(RedisRepositoriesAutoConfigureRegistrar.class)
|
||||
@AutoConfigureAfter(RedisAutoConfiguration.class)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -46,7 +46,8 @@ import org.springframework.data.solr.repository.support.SolrRepositoryFactoryBea
|
|||
@ConditionalOnClass({ SolrClient.class, SolrRepository.class })
|
||||
@ConditionalOnMissingBean({ SolrRepositoryFactoryBean.class,
|
||||
SolrRepositoryConfigExtension.class })
|
||||
@ConditionalOnProperty(prefix = "spring.data.solr.repositories", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.data.solr.repositories", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@Import(SolrRepositoriesRegistrar.class)
|
||||
public class SolrRepositoriesAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -48,7 +48,8 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
|
|||
@Configuration
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass(WebServlet.class)
|
||||
@ConditionalOnProperty(prefix = "spring.h2.console", name = "enabled", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "spring.h2.console", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = false)
|
||||
@EnableConfigurationProperties(H2ConsoleProperties.class)
|
||||
@AutoConfigureAfter(SecurityAutoConfiguration.class)
|
||||
public class H2ConsoleAutoConfiguration {
|
||||
|
@ -78,7 +79,8 @@ public class H2ConsoleAutoConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass(WebSecurityConfigurerAdapter.class)
|
||||
@ConditionalOnBean(ObjectPostProcessor.class)
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
static class H2ConsoleSecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -46,7 +46,8 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl
|
|||
public class HypermediaHttpMessageConverterConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.hateoas", name = "use-hal-as-default-json-media-type", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.hateoas",
|
||||
name = "use-hal-as-default-json-media-type", matchIfMissing = true)
|
||||
public static HalMessageConverterSupportedMediaTypesCustomizer halMessageConverterSupportedMediaTypeCustomizer() {
|
||||
return new HalMessageConverterSupportedMediaTypesCustomizer();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -63,7 +63,8 @@ public class ProjectInfoAutoConfiguration {
|
|||
return new GitProperties(loadFrom(this.properties.getGit().getLocation(), "git"));
|
||||
}
|
||||
|
||||
@ConditionalOnResource(resources = "${spring.info.build.location:classpath:META-INF/build-info.properties}")
|
||||
@ConditionalOnResource(
|
||||
resources = "${spring.info.build.location:classpath:META-INF/build-info.properties}")
|
||||
@ConditionalOnMissingBean
|
||||
@Bean
|
||||
public BuildProperties buildProperties() throws Exception {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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,9 +70,11 @@ public class IntegrationAutoConfiguration {
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(EnableIntegrationMBeanExport.class)
|
||||
@ConditionalOnMissingBean(value = IntegrationMBeanExporter.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = IntegrationMBeanExporter.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnBean(MBeanServer.class)
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
protected static class IntegrationJmxConfiguration
|
||||
implements EnvironmentAware, BeanFactoryAware {
|
||||
|
||||
|
@ -113,12 +115,16 @@ public class IntegrationAutoConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass({ EnableIntegrationManagement.class,
|
||||
EnableIntegrationMBeanExport.class })
|
||||
@ConditionalOnMissingBean(value = IntegrationManagementConfigurer.class, name = IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnMissingBean(value = IntegrationManagementConfigurer.class,
|
||||
name = IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME,
|
||||
search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
protected static class IntegrationManagementConfiguration {
|
||||
|
||||
@Configuration
|
||||
@EnableIntegrationManagement(defaultCountsEnabled = "true", defaultStatsEnabled = "true")
|
||||
@EnableIntegrationManagement(defaultCountsEnabled = "true",
|
||||
defaultStatsEnabled = "true")
|
||||
protected static class EnableIntegrationManagementConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ abstract class DataSourceConfiguration {
|
|||
@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)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type",
|
||||
havingValue = "org.apache.tomcat.jdbc.pool.DataSource", matchIfMissing = true)
|
||||
static class Tomcat {
|
||||
|
||||
@Bean
|
||||
|
@ -76,7 +77,8 @@ abstract class DataSourceConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass(HikariDataSource.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)
|
||||
static class Hikari {
|
||||
|
||||
@Bean
|
||||
|
@ -95,7 +97,9 @@ abstract class DataSourceConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass(org.apache.commons.dbcp.BasicDataSource.class)
|
||||
@ConditionalOnMissingBean(DataSource.class)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type", havingValue = "org.apache.commons.dbcp.BasicDataSource", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "spring.datasource.type",
|
||||
havingValue = "org.apache.commons.dbcp.BasicDataSource",
|
||||
matchIfMissing = true)
|
||||
@Deprecated
|
||||
static class Dbcp {
|
||||
|
||||
|
@ -123,7 +127,9 @@ abstract class DataSourceConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass(org.apache.commons.dbcp2.BasicDataSource.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)
|
||||
static class Dbcp2 {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -143,7 +143,8 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "jerseyFilterRegistration")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "filter")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type",
|
||||
havingValue = "filter")
|
||||
public FilterRegistrationBean jerseyFilterRegistration() {
|
||||
FilterRegistrationBean registration = new FilterRegistrationBean();
|
||||
registration.setFilter(new ServletContainer(this.config));
|
||||
|
@ -166,7 +167,8 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "jerseyServletRegistration")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "servlet", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type",
|
||||
havingValue = "servlet", matchIfMissing = true)
|
||||
public ServletRegistrationBean jerseyServletRegistration() {
|
||||
ServletRegistrationBean registration = new ServletRegistrationBean(
|
||||
new ServletContainer(this.config), this.path);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -84,7 +84,8 @@ class JmsAnnotationDrivenConfiguration {
|
|||
|
||||
@Configuration
|
||||
@EnableJms
|
||||
@ConditionalOnMissingBean(name = JmsListenerConfigUtils.JMS_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
@ConditionalOnMissingBean(
|
||||
name = JmsListenerConfigUtils.JMS_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
protected static class EnableJmsConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -46,7 +46,8 @@ import org.springframework.context.annotation.Configuration;
|
|||
class ActiveMQConnectionFactoryConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled", havingValue = "false", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled",
|
||||
havingValue = "false", matchIfMissing = true)
|
||||
public ActiveMQConnectionFactory jmsConnectionFactory(ActiveMQProperties properties,
|
||||
ObjectProvider<List<ActiveMQConnectionFactoryCustomizer>> factoryCustomizers) {
|
||||
return new ActiveMQConnectionFactoryFactory(properties,
|
||||
|
@ -59,7 +60,8 @@ class ActiveMQConnectionFactoryConfiguration {
|
|||
static class PooledConnectionFactoryConfiguration {
|
||||
|
||||
@Bean(destroyMethod = "stop")
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = false)
|
||||
@ConfigurationProperties(prefix = "spring.activemq.pool.configuration")
|
||||
public PooledConnectionFactory pooledJmsConnectionFactory(
|
||||
ActiveMQProperties properties,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -59,7 +59,8 @@ class ActiveMQXAConnectionFactoryConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled", havingValue = "false", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.activemq.pool", name = "enabled",
|
||||
havingValue = "false", matchIfMissing = true)
|
||||
public ActiveMQConnectionFactory nonXaJmsConnectionFactory(
|
||||
ActiveMQProperties properties,
|
||||
ObjectProvider<List<ActiveMQConnectionFactoryCustomizer>> factoryCustomizers) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -44,7 +44,8 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator;
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(name = ArtemisConnectionFactoryFactory.EMBEDDED_JMS_CLASS)
|
||||
@ConditionalOnProperty(prefix = "spring.artemis.embedded", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.artemis.embedded", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
class ArtemisEmbeddedServerConfiguration {
|
||||
|
||||
private final ArtemisProperties properties;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -52,7 +52,8 @@ import org.springframework.util.StringUtils;
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ MBeanExporter.class })
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.jmx", name = "enabled", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
public class JmxAutoConfiguration implements EnvironmentAware, BeanFactoryAware {
|
||||
|
||||
private RelaxedPropertyResolver propertyResolver;
|
||||
|
@ -71,7 +72,8 @@ public class JmxAutoConfiguration implements EnvironmentAware, BeanFactoryAware
|
|||
|
||||
@Bean
|
||||
@Primary
|
||||
@ConditionalOnMissingBean(value = MBeanExporter.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = MBeanExporter.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public AnnotationMBeanExporter mbeanExporter(ObjectNamingStrategy namingStrategy) {
|
||||
AnnotationMBeanExporter exporter = new AnnotationMBeanExporter();
|
||||
exporter.setRegistrationPolicy(RegistrationPolicy.FAIL_ON_EXISTING);
|
||||
|
@ -84,7 +86,8 @@ public class JmxAutoConfiguration implements EnvironmentAware, BeanFactoryAware
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = ObjectNamingStrategy.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = ObjectNamingStrategy.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public ParentAwareNamingStrategy objectNamingStrategy() {
|
||||
ParentAwareNamingStrategy namingStrategy = new ParentAwareNamingStrategy(
|
||||
new AnnotationJmxAttributeSource());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -61,7 +61,8 @@ class KafkaAnnotationDrivenConfiguration {
|
|||
|
||||
@Configuration
|
||||
@EnableKafka
|
||||
@ConditionalOnMissingBean(name = KafkaListenerConfigUtils.KAFKA_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
@ConditionalOnMissingBean(
|
||||
name = KafkaListenerConfigUtils.KAFKA_LISTENER_ANNOTATION_PROCESSOR_BEAN_NAME)
|
||||
protected static class EnableKafkaConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -51,7 +51,8 @@ import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver;
|
|||
@Configuration
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass(LiteDeviceDelegatingViewResolver.class)
|
||||
@ConditionalOnProperty(prefix = "spring.mobile.devicedelegatingviewresolver", name = "enabled", havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "spring.mobile.devicedelegatingviewresolver",
|
||||
name = "enabled", havingValue = "true")
|
||||
@EnableConfigurationProperties(DeviceDelegatingViewResolverProperties.class)
|
||||
@AutoConfigureAfter({ WebMvcAutoConfiguration.class, FreeMarkerAutoConfiguration.class,
|
||||
GroovyTemplateAutoConfiguration.class, MustacheAutoConfiguration.class,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -46,7 +46,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|||
@ConditionalOnClass({ SitePreferenceHandlerInterceptor.class,
|
||||
SitePreferenceHandlerMethodArgumentResolver.class })
|
||||
@AutoConfigureAfter(DeviceResolverAutoConfiguration.class)
|
||||
@ConditionalOnProperty(prefix = "spring.mobile.sitepreference", name = "enabled", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.mobile.sitepreference", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnWebApplication
|
||||
public class SitePreferenceAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -199,7 +199,8 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
|
|||
@ConditionalOnClass(WebMvcConfigurerAdapter.class)
|
||||
@ConditionalOnMissingBean({ OpenEntityManagerInViewInterceptor.class,
|
||||
OpenEntityManagerInViewFilter.class })
|
||||
@ConditionalOnProperty(prefix = "spring.jpa", name = "open-in-view", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.jpa", name = "open-in-view",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
protected static class JpaWebConfiguration {
|
||||
|
||||
// Defined as a nested config to ensure WebMvcConfigurerAdapter is not read when
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -222,7 +222,8 @@ public class SpringBootWebSecurityConfiguration {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled", havingValue = "false")
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled",
|
||||
havingValue = "false")
|
||||
@Order(SecurityProperties.BASIC_AUTH_ORDER)
|
||||
protected static class ApplicationNoWebSecurityConfigurerAdapter
|
||||
extends WebSecurityConfigurerAdapter {
|
||||
|
@ -240,7 +241,8 @@ public class SpringBootWebSecurityConfiguration {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "security.basic", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@Order(SecurityProperties.BASIC_AUTH_ORDER)
|
||||
protected static class ApplicationWebSecurityConfigurerAdapter
|
||||
extends WebSecurityConfigurerAdapter {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -199,7 +199,8 @@ public class OAuth2RestOperationsConfiguration {
|
|||
super(ConfigurationPhase.PARSE_CONFIGURATION);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(prefix = "security.oauth2.client", name = "grant-type", havingValue = "client_credentials", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "security.oauth2.client", name = "grant-type",
|
||||
havingValue = "client_credentials", matchIfMissing = false)
|
||||
static class ClientCredentialsConfigured {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -85,14 +85,16 @@ public class TransactionAutoConfiguration {
|
|||
|
||||
@Configuration
|
||||
@EnableTransactionManagement(proxyTargetClass = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "false", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class",
|
||||
havingValue = "false", matchIfMissing = false)
|
||||
public static class JdkDynamicAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.aop", name = "proxy-target-class",
|
||||
havingValue = "true", matchIfMissing = true)
|
||||
public static class CglibAutoProxyConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -44,7 +44,8 @@ import org.springframework.validation.beanvalidation.MethodValidationPostProcess
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(ExecutableValidator.class)
|
||||
@ConditionalOnResource(resources = "classpath:META-INF/services/javax.validation.spi.ValidationProvider")
|
||||
@ConditionalOnResource(
|
||||
resources = "classpath:META-INF/services/javax.validation.spi.ValidationProvider")
|
||||
@Import(PrimaryDefaultValidatorPostProcessor.class)
|
||||
public class ValidationAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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,7 +133,8 @@ public class DispatcherServletAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean(name = DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME)
|
||||
@ConditionalOnBean(value = DispatcherServlet.class, name = DEFAULT_DISPATCHER_SERVLET_BEAN_NAME)
|
||||
@ConditionalOnBean(value = DispatcherServlet.class,
|
||||
name = DEFAULT_DISPATCHER_SERVLET_BEAN_NAME)
|
||||
public ServletRegistrationBean dispatcherServletRegistration(
|
||||
DispatcherServlet dispatcherServlet) {
|
||||
ServletRegistrationBean registration = new ServletRegistrationBean(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -71,7 +71,8 @@ public class EmbeddedServletContainerAutoConfiguration {
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Servlet.class, Tomcat.class })
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public static class EmbeddedTomcat {
|
||||
|
||||
@Bean
|
||||
|
@ -87,7 +88,8 @@ public class EmbeddedServletContainerAutoConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass({ Servlet.class, Server.class, Loader.class,
|
||||
WebAppContext.class })
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public static class EmbeddedJetty {
|
||||
|
||||
@Bean
|
||||
|
@ -102,7 +104,8 @@ public class EmbeddedServletContainerAutoConfiguration {
|
|||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ Servlet.class, Undertow.class, SslClientAuthMode.class })
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public static class EmbeddedUndertow {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -93,13 +93,15 @@ public class ErrorMvcAutoConfiguration {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = ErrorAttributes.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = ErrorAttributes.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public DefaultErrorAttributes errorAttributes() {
|
||||
return new DefaultErrorAttributes();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = ErrorController.class, search = SearchStrategy.CURRENT)
|
||||
@ConditionalOnMissingBean(value = ErrorController.class,
|
||||
search = SearchStrategy.CURRENT)
|
||||
public BasicErrorController basicErrorController(ErrorAttributes errorAttributes) {
|
||||
return new BasicErrorController(errorAttributes, this.serverProperties.getError(),
|
||||
this.errorViewResolvers);
|
||||
|
@ -139,7 +141,8 @@ public class ErrorMvcAutoConfiguration {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "server.error.whitelabel", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "server.error.whitelabel", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@Conditional(ErrorTemplateMissingCondition.class)
|
||||
protected static class WhitelabelErrorViewConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -60,7 +60,9 @@ class GsonHttpMessageConvertersConfiguration {
|
|||
super(ConfigurationPhase.REGISTER_BEAN);
|
||||
}
|
||||
|
||||
@ConditionalOnProperty(name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY, havingValue = "gson", matchIfMissing = false)
|
||||
@ConditionalOnProperty(
|
||||
name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY,
|
||||
havingValue = "gson", matchIfMissing = false)
|
||||
static class GsonPreferred {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -43,7 +43,8 @@ import org.springframework.web.filter.CharacterEncodingFilter;
|
|||
@EnableConfigurationProperties(HttpEncodingProperties.class)
|
||||
@ConditionalOnWebApplication
|
||||
@ConditionalOnClass(CharacterEncodingFilter.class)
|
||||
@ConditionalOnProperty(prefix = "spring.http.encoding", value = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.http.encoding", value = "enabled",
|
||||
matchIfMissing = true)
|
||||
public class HttpEncodingAutoConfiguration {
|
||||
|
||||
private final HttpEncodingProperties properties;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -41,13 +41,16 @@ class JacksonHttpMessageConvertersConfiguration {
|
|||
@Configuration
|
||||
@ConditionalOnClass(ObjectMapper.class)
|
||||
@ConditionalOnBean(ObjectMapper.class)
|
||||
@ConditionalOnProperty(name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY, havingValue = "jackson", matchIfMissing = true)
|
||||
@ConditionalOnProperty(
|
||||
name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY,
|
||||
havingValue = "jackson", matchIfMissing = true)
|
||||
protected static class MappingJackson2HttpMessageConverterConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = MappingJackson2HttpMessageConverter.class, ignoredType = {
|
||||
"org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessageConverter",
|
||||
"org.springframework.data.rest.webmvc.alps.AlpsJsonHttpMessageConverter" })
|
||||
@ConditionalOnMissingBean(value = MappingJackson2HttpMessageConverter.class,
|
||||
ignoredType = {
|
||||
"org.springframework.hateoas.mvc.TypeConstrainedMappingJackson2HttpMessageConverter",
|
||||
"org.springframework.data.rest.webmvc.alps.AlpsJsonHttpMessageConverter" })
|
||||
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(
|
||||
ObjectMapper objectMapper) {
|
||||
return new MappingJackson2HttpMessageConverter(objectMapper);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -49,7 +49,8 @@ import org.springframework.web.servlet.DispatcherServlet;
|
|||
@Configuration
|
||||
@ConditionalOnClass({ Servlet.class, StandardServletMultipartResolver.class,
|
||||
MultipartConfigElement.class })
|
||||
@ConditionalOnProperty(prefix = "spring.http.multipart", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.http.multipart", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
@EnableConfigurationProperties(MultipartProperties.class)
|
||||
public class MultipartAutoConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -364,7 +364,8 @@ public class ServerProperties
|
|||
}
|
||||
|
||||
@Deprecated
|
||||
@DeprecatedConfigurationProperty(reason = "Use dedicated property for each container.")
|
||||
@DeprecatedConfigurationProperty(
|
||||
reason = "Use dedicated property for each container.")
|
||||
public int getMaxHttpPostSize() {
|
||||
return this.maxHttpPostSize;
|
||||
}
|
||||
|
@ -1419,7 +1420,8 @@ public class ServerProperties
|
|||
this.bufferSize = bufferSize;
|
||||
}
|
||||
|
||||
@DeprecatedConfigurationProperty(reason = "The property is not used by Undertow. See https://issues.jboss.org/browse/UNDERTOW-587 for details")
|
||||
@DeprecatedConfigurationProperty(
|
||||
reason = "The property is not used by Undertow. See https://issues.jboss.org/browse/UNDERTOW-587 for details")
|
||||
public Integer getBuffersPerRegion() {
|
||||
return this.buffersPerRegion;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -144,7 +144,8 @@ public class WebMvcAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(HttpPutFormContentFilter.class)
|
||||
@ConditionalOnProperty(prefix = "spring.mvc.formcontent.putfilter", name = "enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "spring.mvc.formcontent.putfilter", name = "enabled",
|
||||
matchIfMissing = true)
|
||||
public OrderedHttpPutFormContentFilter httpPutFormContentFilter() {
|
||||
return new OrderedHttpPutFormContentFilter();
|
||||
}
|
||||
|
@ -222,7 +223,8 @@ public class WebMvcAutoConfiguration {
|
|||
|
||||
@Bean
|
||||
@ConditionalOnBean(ViewResolver.class)
|
||||
@ConditionalOnMissingBean(name = "viewResolver", value = ContentNegotiatingViewResolver.class)
|
||||
@ConditionalOnMissingBean(name = "viewResolver",
|
||||
value = ContentNegotiatingViewResolver.class)
|
||||
public ContentNegotiatingViewResolver viewResolver(BeanFactory beanFactory) {
|
||||
ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver();
|
||||
resolver.setContentNegotiationManager(
|
||||
|
@ -326,7 +328,8 @@ public class WebMvcAutoConfiguration {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "spring.mvc.favicon.enabled", matchIfMissing = true)
|
||||
@ConditionalOnProperty(value = "spring.mvc.favicon.enabled",
|
||||
matchIfMissing = true)
|
||||
public static class FaviconConfiguration {
|
||||
|
||||
private final ResourceProperties resourceProperties;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -59,7 +59,8 @@ import org.springframework.context.annotation.Configuration;
|
|||
public class WebSocketAutoConfiguration {
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnClass(name = "org.apache.tomcat.websocket.server.WsSci", value = Tomcat.class)
|
||||
@ConditionalOnClass(name = "org.apache.tomcat.websocket.server.WsSci",
|
||||
value = Tomcat.class)
|
||||
static class TomcatWebSocketConfiguration {
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -65,7 +65,9 @@ public class AutoConfigurationExcludeFilterTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackageClasses = ExampleConfiguration.class, excludeFilters = @ComponentScan.Filter(type = FilterType.CUSTOM, classes = TestAutoConfigurationExcludeFilter.class))
|
||||
@ComponentScan(basePackageClasses = ExampleConfiguration.class,
|
||||
excludeFilters = @ComponentScan.Filter(type = FilterType.CUSTOM,
|
||||
classes = TestAutoConfigurationExcludeFilter.class))
|
||||
static class Config {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -320,12 +320,14 @@ public class AutoConfigurationImportSelectorTests {
|
|||
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
|
||||
@EnableAutoConfiguration(
|
||||
excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
|
||||
private class EnableAutoConfigurationWithClassNameExclusions {
|
||||
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(exclude = MustacheAutoConfiguration.class, excludeName = "org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration")
|
||||
@EnableAutoConfiguration(exclude = MustacheAutoConfiguration.class,
|
||||
excludeName = "org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration")
|
||||
private class EnableAutoConfigurationWithClassAndClassNameExclusions {
|
||||
|
||||
}
|
||||
|
@ -335,17 +337,20 @@ public class AutoConfigurationImportSelectorTests {
|
|||
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(excludeName = "org.springframework.boot.autoconfigure.AutoConfigurationImportSelectorTests.TestConfiguration")
|
||||
@EnableAutoConfiguration(
|
||||
excludeName = "org.springframework.boot.autoconfigure.AutoConfigurationImportSelectorTests.TestConfiguration")
|
||||
private class EnableAutoConfigurationWithFaultyClassNameExclude {
|
||||
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(excludeName = "org.springframework.boot.autoconfigure.DoesNotExist1")
|
||||
@EnableAutoConfiguration(
|
||||
excludeName = "org.springframework.boot.autoconfigure.DoesNotExist1")
|
||||
private class EnableAutoConfigurationWithAbsentClassNameExclude {
|
||||
|
||||
}
|
||||
|
||||
@SpringBootApplication(excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
|
||||
@SpringBootApplication(
|
||||
excludeName = "org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration")
|
||||
private class SpringBootApplicationWithClassNameExclusions {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -208,7 +208,8 @@ public class AutoConfigurationSorterTests {
|
|||
|
||||
}
|
||||
|
||||
@AutoConfigureAfter(name = "org.springframework.boot.autoconfigure.AutoConfigurationSorterTests$AutoConfigureB")
|
||||
@AutoConfigureAfter(
|
||||
name = "org.springframework.boot.autoconfigure.AutoConfigurationSorterTests$AutoConfigureB")
|
||||
public static class AutoConfigureA2 {
|
||||
|
||||
}
|
||||
|
@ -237,7 +238,8 @@ public class AutoConfigurationSorterTests {
|
|||
|
||||
}
|
||||
|
||||
@AutoConfigureBefore(name = "org.springframework.boot.autoconfigure.AutoConfigurationSorterTests$AutoConfigureB")
|
||||
@AutoConfigureBefore(
|
||||
name = "org.springframework.boot.autoconfigure.AutoConfigurationSorterTests$AutoConfigureB")
|
||||
public static class AutoConfigureW2 {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -90,8 +90,8 @@ public class ImportAutoConfigurationTests {
|
|||
|
||||
}
|
||||
|
||||
@ImportAutoConfiguration(classes = { ConfigD.class,
|
||||
ConfigB.class }, exclude = ConfigC.class)
|
||||
@ImportAutoConfiguration(classes = { ConfigD.class, ConfigB.class },
|
||||
exclude = ConfigC.class)
|
||||
@MetaImportAutoConfiguration
|
||||
static class ExcludingConfig {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -384,13 +384,17 @@ public class ConditionalOnMissingBeanTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = "org.springframework.boot.autoconfigure.condition.scan", includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = ScannedFactoryBeanConfiguration.class))
|
||||
@ComponentScan(basePackages = "org.springframework.boot.autoconfigure.condition.scan",
|
||||
includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE,
|
||||
classes = ScannedFactoryBeanConfiguration.class))
|
||||
protected static class ComponentScannedFactoryBeanBeanMethodConfiguration {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = "org.springframework.boot.autoconfigure.condition.scan", includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = ScannedFactoryBeanWithBeanMethodArgumentsConfiguration.class))
|
||||
@ComponentScan(basePackages = "org.springframework.boot.autoconfigure.condition.scan",
|
||||
includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE,
|
||||
classes = ScannedFactoryBeanWithBeanMethodArgumentsConfiguration.class))
|
||||
protected static class ComponentScannedFactoryBeanBeanMethodWithArgumentsConfiguration {
|
||||
|
||||
}
|
||||
|
@ -515,7 +519,8 @@ public class ConditionalOnMissingBeanTests {
|
|||
protected static class ConditionalOnIgnoredSubclass {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = ExampleBean.class, ignored = CustomExampleBean.class)
|
||||
@ConditionalOnMissingBean(value = ExampleBean.class,
|
||||
ignored = CustomExampleBean.class)
|
||||
public ExampleBean exampleBean() {
|
||||
return new ExampleBean("test");
|
||||
}
|
||||
|
@ -526,7 +531,8 @@ public class ConditionalOnMissingBeanTests {
|
|||
protected static class ConditionalOnIgnoredSubclassByName {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(value = ExampleBean.class, ignoredType = "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBeanTests.CustomExampleBean")
|
||||
@ConditionalOnMissingBean(value = ExampleBean.class,
|
||||
ignoredType = "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBeanTests.CustomExampleBean")
|
||||
public ExampleBean exampleBean() {
|
||||
return new ExampleBean("test");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -57,7 +57,8 @@ public class ConditionalOnMissingBeanWithFilteredClasspathTests {
|
|||
static class OnBeanTypeConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(type = "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBeanWithFilteredClasspathTests.TestCacheManager")
|
||||
@ConditionalOnMissingBean(
|
||||
type = "org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBeanWithFilteredClasspathTests.TestCacheManager")
|
||||
public String foo() {
|
||||
return "foo";
|
||||
}
|
||||
|
|
|
@ -323,7 +323,8 @@ public class ConditionalOnPropertyTests {
|
|||
|
||||
@Configuration
|
||||
// i.e ${simple.myProperty:true}
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true", matchIfMissing = true)
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
static class EnabledIfNotConfiguredOtherwiseConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -335,7 +336,8 @@ public class ConditionalOnPropertyTests {
|
|||
|
||||
@Configuration
|
||||
// i.e ${simple.myProperty:false}
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "true",
|
||||
matchIfMissing = false)
|
||||
static class DisabledIfNotConfiguredOtherwiseConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -357,7 +359,8 @@ public class ConditionalOnPropertyTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(name = "simple.myProperty", havingValue = "bar", matchIfMissing = true)
|
||||
@ConditionalOnProperty(name = "simple.myProperty", havingValue = "bar",
|
||||
matchIfMissing = true)
|
||||
static class DefaultValueConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -379,7 +382,8 @@ public class ConditionalOnPropertyTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "bar", relaxedNames = false)
|
||||
@ConditionalOnProperty(prefix = "simple", name = "my-property", havingValue = "bar",
|
||||
relaxedNames = false)
|
||||
static class StrictNameConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -390,8 +394,8 @@ public class ConditionalOnPropertyTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "simple", name = { "my-property",
|
||||
"my-another-property" }, havingValue = "bar")
|
||||
@ConditionalOnProperty(prefix = "simple",
|
||||
name = { "my-property", "my-another-property" }, havingValue = "bar")
|
||||
static class MultiValuesConfig {
|
||||
|
||||
@Bean
|
||||
|
@ -447,7 +451,8 @@ public class ConditionalOnPropertyTests {
|
|||
|
||||
@Configuration
|
||||
@ConditionalOnMyFeature
|
||||
@ConditionalOnProperty(prefix = "my.other.feature", name = "enabled", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "my.other.feature", name = "enabled",
|
||||
havingValue = "true", matchIfMissing = false)
|
||||
protected static class MetaAnnotationAndDirectAnnotation {
|
||||
|
||||
@Bean
|
||||
|
@ -459,7 +464,8 @@ public class ConditionalOnPropertyTests {
|
|||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||
@ConditionalOnProperty(prefix = "my.feature", name = "enabled", havingValue = "true", matchIfMissing = false)
|
||||
@ConditionalOnProperty(prefix = "my.feature", name = "enabled", havingValue = "true",
|
||||
matchIfMissing = false)
|
||||
public @interface ConditionalOnMyFeature {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -103,8 +103,8 @@ public class CassandraDataAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(excludeFilters = @ComponentScan.Filter(classes = {
|
||||
Session.class }, type = FilterType.ASSIGNABLE_TYPE))
|
||||
@ComponentScan(excludeFilters = @ComponentScan.Filter(classes = { Session.class },
|
||||
type = FilterType.ASSIGNABLE_TYPE))
|
||||
static class TestExcludeConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -128,8 +128,8 @@ public class CassandraRepositoriesAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(excludeFilters = @ComponentScan.Filter(classes = {
|
||||
Session.class }, type = FilterType.ASSIGNABLE_TYPE))
|
||||
@ComponentScan(excludeFilters = @ComponentScan.Filter(classes = { Session.class },
|
||||
type = FilterType.ASSIGNABLE_TYPE))
|
||||
static class TestExcludeConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -106,7 +106,8 @@ public class ElasticsearchRepositoriesAutoConfigurationTests {
|
|||
|
||||
@Configuration
|
||||
@TestAutoConfigurationPackage(ElasticsearchRepositoriesAutoConfigurationTests.class)
|
||||
@EnableElasticsearchRepositories(basePackageClasses = CityElasticsearchDbRepository.class)
|
||||
@EnableElasticsearchRepositories(
|
||||
basePackageClasses = CityElasticsearchDbRepository.class)
|
||||
protected static class CustomizedConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -21,7 +21,8 @@ import java.io.Serializable;
|
|||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
|
||||
@Document(indexName = "city", type = "city", shards = 1, replicas = 0, refreshInterval = "-1")
|
||||
@Document(indexName = "city", type = "city", shards = 1, replicas = 0,
|
||||
refreshInterval = "-1")
|
||||
public class City implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -97,9 +97,13 @@ public class JpaRepositoriesAutoConfigurationTests {
|
|||
}
|
||||
|
||||
@Configuration
|
||||
@EnableJpaRepositories(basePackageClasses = org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository.class, excludeFilters = {
|
||||
@Filter(type = FilterType.ASSIGNABLE_TYPE, value = CityMongoDbRepository.class),
|
||||
@Filter(type = FilterType.ASSIGNABLE_TYPE, value = CitySolrRepository.class) })
|
||||
@EnableJpaRepositories(
|
||||
basePackageClasses = org.springframework.boot.autoconfigure.data.alt.jpa.CityJpaRepository.class,
|
||||
excludeFilters = {
|
||||
@Filter(type = FilterType.ASSIGNABLE_TYPE,
|
||||
value = CityMongoDbRepository.class),
|
||||
@Filter(type = FilterType.ASSIGNABLE_TYPE,
|
||||
value = CitySolrRepository.class) })
|
||||
@TestAutoConfigurationPackage(City.class)
|
||||
protected static class CustomConfiguration {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -101,7 +101,8 @@ public class SolrRepositoriesAutoConfigurationTests {
|
|||
|
||||
@Configuration
|
||||
@TestAutoConfigurationPackage(SolrRepositoriesAutoConfigurationTests.class)
|
||||
@EnableSolrRepositories(basePackageClasses = CitySolrRepository.class, multicoreSupport = true)
|
||||
@EnableSolrRepositories(basePackageClasses = CitySolrRepository.class,
|
||||
multicoreSupport = true)
|
||||
protected static class CustomizedConfiguration {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -54,8 +54,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"spring.jersey.type=filter", "server.contextPath=/app" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "spring.jersey.type=filter", "server.contextPath=/app" })
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationCustomFilterContextPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -54,7 +54,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jersey.type=filter")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jersey.type=filter")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationCustomFilterPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -47,7 +47,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Stephane Nicoll
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jersey.servlet.load-on-startup=5")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jersey.servlet.load-on-startup=5")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationCustomLoadOnStartupTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -54,7 +54,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Eddú Meléndez
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jackson.default-property-inclusion=non_null")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jackson.default-property-inclusion=non_null")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationCustomObjectMapperProviderTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -55,7 +55,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
*/
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "server.contextPath=/app")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "server.contextPath=/app")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationCustomServletContextPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -53,7 +53,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jersey.type=filter")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jersey.type=filter")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationDefaultFilterPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -56,7 +56,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Andy Wilkinson
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jackson.default-property-inclusion:non-null")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jackson.default-property-inclusion:non-null")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationObjectMapperProviderTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -53,7 +53,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Eddú Meléndez
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.jersey.application-path=/api")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "spring.jersey.application-path=/api")
|
||||
@DirtiesContext
|
||||
public class JerseyAutoConfigurationWithoutApplicationPathTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -54,8 +54,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"spring.mustache.prefix:classpath:/mustache-templates/" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "spring.mustache.prefix:classpath:/mustache-templates/" })
|
||||
public class MustacheAutoConfigurationIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -40,8 +40,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@DirtiesContext
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE, properties = { "env.foo=There",
|
||||
"foo=World" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE,
|
||||
properties = { "env.foo=There", "foo=World" })
|
||||
public class MustacheStandaloneIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -42,7 +42,8 @@ import org.springframework.test.context.junit4.SpringRunner;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@ContextConfiguration(classes = JpaUserDetailsTests.Main.class, loader = SpringBootContextLoader.class)
|
||||
@ContextConfiguration(classes = JpaUserDetailsTests.Main.class,
|
||||
loader = SpringBootContextLoader.class)
|
||||
@DirtiesContext
|
||||
public class JpaUserDetailsTests {
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = {
|
||||
"security.oauth2.resource.userInfoUri:https://example.com",
|
||||
"security.oauth2.client.clientId=foo" })
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = { "security.oauth2.resource.userInfoUri:https://example.com",
|
||||
"security.oauth2.client.clientId=foo" })
|
||||
@DirtiesContext
|
||||
public class UserInfoTokenServicesRefreshTokenTests {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
|
@ -43,7 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
* @author Dave Syer
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "server.servletPath:/spring/*")
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
|
||||
properties = "server.servletPath:/spring/*")
|
||||
@DirtiesContext
|
||||
public class RemappedErrorViewIntegrationTests {
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue