See gh-13790
This commit is contained in:
Johnny Lim 2018-07-17 04:19:36 +09:00 committed by Stephane Nicoll
parent ec2ebf52de
commit f363fe7dd1
6 changed files with 17 additions and 13 deletions

View File

@ -81,11 +81,9 @@ public class ServletEndpointManagementContextConfiguration {
private Set<String> getServletPaths(WebEndpointProperties properties, private Set<String> getServletPaths(WebEndpointProperties properties,
DispatcherServletPathProvider servletPathProvider) { DispatcherServletPathProvider servletPathProvider) {
Set<String> servletPaths = servletPathProvider.getServletPaths(); return servletPathProvider.getServletPaths().stream()
return servletPaths.stream().map((p) -> { .map((p) -> cleanServletPath(p) + properties.getBasePath())
String path = cleanServletPath(p); .collect(Collectors.toSet());
return path + properties.getBasePath();
}).collect(Collectors.toSet());
} }
private String cleanServletPath(String servletPath) { private String cleanServletPath(String servletPath) {

View File

@ -82,12 +82,12 @@ public class RestTemplateMetricsAutoConfiguration {
} }
/** /**
* {@link MeterFilter} to deny further client requests and log a warning. * {@link MeterFilter} to deny further URI tags and log a warning.
*/ */
private static class MaximumUriTagsReachedMeterFilter implements MeterFilter { private static class MaximumUriTagsReachedMeterFilter implements MeterFilter {
private final Logger logger = LoggerFactory private final Logger logger = LoggerFactory
.getLogger(RestTemplateMetricsAutoConfiguration.class); .getLogger(MaximumUriTagsReachedMeterFilter.class);
private final String metricName; private final String metricName;

View File

@ -58,6 +58,12 @@ public abstract class AbstractDependsOnBeanFactoryPostProcessor
this.dependsOn = dependsOn; this.dependsOn = dependsOn;
} }
/**
* Create an instance with target bean class and dependencies.
* @param beanClass target bean class
* @param dependsOn dependencies
* @since 2.0.4
*/
protected AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass, protected AbstractDependsOnBeanFactoryPostProcessor(Class<?> beanClass,
String... dependsOn) { String... dependsOn) {
this(beanClass, null, dependsOn); this(beanClass, null, dependsOn);

View File

@ -206,7 +206,7 @@ public class FlywayAutoConfiguration {
} }
/** /**
* Additional configuration to ensure that {@link JdbcOperations} beans depend-on * Additional configuration to ensure that {@link JdbcOperations} beans depend on
* the {@code flywayInitializer} bean. * the {@code flywayInitializer} bean.
*/ */
@Configuration @Configuration
@ -240,16 +240,16 @@ public class FlywayAutoConfiguration {
} }
/** /**
* Additional configuration to ensure that {@link JdbcOperations} beans depend-on the * Additional configuration to ensure that {@link JdbcOperations} beans depend on the
* {@code flyway} bean. * {@code flyway} bean.
*/ */
@Configuration @Configuration
@ConditionalOnClass(JdbcOperations.class) @ConditionalOnClass(JdbcOperations.class)
@ConditionalOnBean(JdbcOperations.class) @ConditionalOnBean(JdbcOperations.class)
protected static class FlywayJdbcDependencyConfiguration protected static class FlywayJdbcOperationsDependencyConfiguration
extends JdbcOperationsDependsOnPostProcessor { extends JdbcOperationsDependsOnPostProcessor {
public FlywayJdbcDependencyConfiguration() { public FlywayJdbcOperationsDependencyConfiguration() {
super("flyway"); super("flyway");
} }

View File

@ -33,7 +33,7 @@ import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
/** /**
* Additional configuration to ensure that {@link EntityManagerFactory} beans depend-on * Additional configuration to ensure that {@link EntityManagerFactory} beans depend on
* the {@code hazelcastInstance} bean. * the {@code hazelcastInstance} bean.
* *
* @author Stephane Nicoll * @author Stephane Nicoll

View File

@ -192,7 +192,7 @@ public class LiquibaseAutoConfiguration {
} }
/** /**
* Additional configuration to ensure that {@link JdbcOperations} beans depend-on the * Additional configuration to ensure that {@link JdbcOperations} beans depend on the
* liquibase bean. * liquibase bean.
*/ */
@Configuration @Configuration