Merge branch '2.1.x'

pull/15642/head
Stephane Nicoll 6 years ago
commit 5e736c0d1f

@ -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.
@ -37,12 +37,12 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@AutoConfigureAfter(AuditAutoConfiguration.class)
@ConditionalOnEnabledEndpoint(endpoint = AuditEventsEndpoint.class)
public class AuditEventsEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(AuditEventRepository.class)
@ConditionalOnEnabledEndpoint
public AuditEventsEndpoint auditEventsEndpoint(
AuditEventRepository auditEventRepository) {
return new AuditEventsEndpoint(auditEventRepository);

@ -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.
@ -31,11 +31,11 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = BeansEndpoint.class)
public class BeansEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public BeansEndpoint beansEndpoint(
ConfigurableApplicationContext applicationContext) {
return new BeansEndpoint(applicationContext);

@ -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.
@ -42,12 +42,12 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnClass(CacheManager.class)
@ConditionalOnEnabledEndpoint(endpoint = CachesEndpoint.class)
@AutoConfigureAfter(CacheAutoConfiguration.class)
public class CachesEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public CachesEndpoint cachesEndpoint(
ObjectProvider<Map<String, CacheManager>> cacheManagers) {
return new CachesEndpoint(cacheManagers.getIfAvailable(LinkedHashMap::new));
@ -55,7 +55,6 @@ public class CachesEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@ConditionalOnBean(CachesEndpoint.class)
public CachesEndpointWebExtension cachesEndpointWebExtension(
CachesEndpoint cachesEndpoint) {

@ -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.
@ -32,11 +32,11 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = ConditionsReportEndpoint.class)
public class ConditionsReportEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean(search = SearchStrategy.CURRENT)
@ConditionalOnEnabledEndpoint
public ConditionsReportEndpoint conditionsReportEndpoint(
ConfigurableApplicationContext context) {
return new ConditionsReportEndpoint(context);

@ -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.
@ -30,11 +30,11 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = ShutdownEndpoint.class)
public class ShutdownEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public ShutdownEndpoint shutdownEndpoint() {
return new ShutdownEndpoint();
}

@ -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.
@ -33,6 +33,7 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = ConfigurationPropertiesReportEndpoint.class)
@EnableConfigurationProperties(ConfigurationPropertiesReportEndpointProperties.class)
public class ConfigurationPropertiesReportEndpointAutoConfiguration {
@ -45,7 +46,6 @@ public class ConfigurationPropertiesReportEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public ConfigurationPropertiesReportEndpoint configurationPropertiesReportEndpoint() {
ConfigurationPropertiesReportEndpoint endpoint = new ConfigurationPropertiesReportEndpoint();
String[] keysToSanitize = this.properties.getKeysToSanitize();

@ -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.
@ -92,7 +92,7 @@ import org.springframework.core.env.Environment;
* @see Endpoint
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Target({ ElementType.METHOD, ElementType.TYPE })
@Documented
@Conditional(OnEnabledEndpointCondition.class)
public @interface ConditionalOnEnabledEndpoint {

@ -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.
@ -90,15 +90,11 @@ class OnEnabledEndpointCondition extends SpringBootCondition {
private AnnotationAttributes getEndpointAttributes(ConditionContext context,
AnnotatedTypeMetadata metadata) {
Assert.state(
metadata instanceof MethodMetadata
&& metadata.isAnnotated(Bean.class.getName()),
"OnEnabledEndpointCondition may only be used on @Bean methods");
Class<?> endpointType = getEndpointType(context, (MethodMetadata) metadata);
return getEndpointAttributes(endpointType);
return getEndpointAttributes(getEndpointType(context, metadata));
}
private Class<?> getEndpointType(ConditionContext context, MethodMetadata metadata) {
private Class<?> getEndpointType(ConditionContext context,
AnnotatedTypeMetadata metadata) {
Map<String, Object> attributes = metadata
.getAnnotationAttributes(ConditionalOnEnabledEndpoint.class.getName());
if (attributes != null && attributes.containsKey("endpoint")) {
@ -107,15 +103,19 @@ class OnEnabledEndpointCondition extends SpringBootCondition {
return target;
}
}
// We should be safe to load at this point since we are in the REGISTER_BEAN phase
Assert.state(
metadata instanceof MethodMetadata
&& metadata.isAnnotated(Bean.class.getName()),
"OnEnabledEndpointCondition must be used on @Bean methods when the endpoint is not specified");
MethodMetadata methodMetadata = (MethodMetadata) metadata;
try {
return ClassUtils.forName(metadata.getReturnTypeName(),
return ClassUtils.forName(methodMetadata.getReturnTypeName(),
context.getClassLoader());
}
catch (Throwable ex) {
throw new IllegalStateException("Failed to extract endpoint id for "
+ metadata.getDeclaringClassName() + "." + metadata.getMethodName(),
ex);
+ methodMetadata.getDeclaringClassName() + "."
+ methodMetadata.getMethodName(), ex);
}
}

@ -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.
@ -35,6 +35,7 @@ import org.springframework.core.env.Environment;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = EnvironmentEndpoint.class)
@EnableConfigurationProperties(EnvironmentEndpointProperties.class)
public class EnvironmentEndpointAutoConfiguration {
@ -47,7 +48,6 @@ public class EnvironmentEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public EnvironmentEndpoint environmentEndpoint(Environment environment) {
EnvironmentEndpoint endpoint = new EnvironmentEndpoint(environment);
String[] keysToSanitize = this.properties.getKeysToSanitize();
@ -59,7 +59,6 @@ public class EnvironmentEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@ConditionalOnBean(EnvironmentEndpoint.class)
public EnvironmentEndpointWebExtension environmentEndpointWebExtension(
EnvironmentEndpoint environmentEndpoint) {

@ -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.
@ -38,13 +38,13 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnClass(Flyway.class)
@ConditionalOnEnabledEndpoint(endpoint = FlywayEndpoint.class)
@AutoConfigureAfter(FlywayAutoConfiguration.class)
public class FlywayEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(Flyway.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public FlywayEndpoint flywayEndpoint(ApplicationContext context) {
return new FlywayEndpoint(context);
}

@ -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.
@ -33,11 +33,11 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnSingleCandidate(HealthIndicatorRegistry.class)
@ConditionalOnEnabledEndpoint(endpoint = HealthEndpoint.class)
class HealthEndpointConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public HealthEndpoint healthEndpoint(HealthAggregator healthAggregator,
HealthIndicatorRegistry registry) {
return new HealthEndpoint(

@ -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.
@ -69,6 +69,7 @@ class HealthEndpointWebExtensionConfiguration {
@Configuration
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnSingleCandidate(ReactiveHealthIndicatorRegistry.class)
@ConditionalOnEnabledEndpoint(endpoint = HealthEndpoint.class)
static class ReactiveWebHealthConfiguration {
private final ReactiveHealthIndicator reactiveHealthIndicator;
@ -82,7 +83,6 @@ class HealthEndpointWebExtensionConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@ConditionalOnBean(HealthEndpoint.class)
public ReactiveHealthEndpointWebExtension reactiveHealthEndpointWebExtension(
HealthWebEndpointResponseMapper responseMapper) {
@ -94,11 +94,11 @@ class HealthEndpointWebExtensionConfiguration {
@Configuration
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnEnabledEndpoint(endpoint = HealthEndpoint.class)
static class ServletWebHealthConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@ConditionalOnBean(HealthEndpoint.class)
public HealthEndpointWebExtension healthEndpointWebExtension(
HealthEndpoint healthEndpoint,

@ -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.
@ -35,12 +35,12 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = InfoEndpoint.class)
@AutoConfigureAfter(InfoContributorAutoConfiguration.class)
public class InfoEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public InfoEndpoint infoEndpoint(ObjectProvider<InfoContributor> infoContributors) {
return new InfoEndpoint(
infoContributors.orderedStream().collect(Collectors.toList()));

@ -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,12 +40,12 @@ import org.springframework.integration.graph.IntegrationGraphServer;
@Configuration
@ConditionalOnClass(IntegrationGraphServer.class)
@ConditionalOnBean(IntegrationConfigurationBeanFactoryPostProcessor.class)
@ConditionalOnEnabledEndpoint(endpoint = IntegrationGraphEndpoint.class)
@AutoConfigureAfter(IntegrationAutoConfiguration.class)
public class IntegrationGraphEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public IntegrationGraphEndpoint integrationGraphEndpoint(
IntegrationGraphServer integrationGraphServer) {
return new IntegrationGraphEndpoint(integrationGraphServer);
@ -53,7 +53,6 @@ public class IntegrationGraphEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint(endpoint = IntegrationGraphEndpoint.class)
public IntegrationGraphServer integrationGraphServer() {
return new IntegrationGraphServer();
}

@ -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.
@ -36,11 +36,11 @@ import org.springframework.context.annotation.Configuration;
@Configuration
@ConditionalOnWebApplication(type = Type.SERVLET)
@ConditionalOnClass(AgentServlet.class)
@ConditionalOnEnabledEndpoint(endpoint = JolokiaEndpoint.class)
@EnableConfigurationProperties(JolokiaProperties.class)
public class JolokiaEndpointAutoConfiguration {
@Bean
@ConditionalOnEnabledEndpoint
public JolokiaEndpoint jolokiaEndpoint(JolokiaProperties properties) {
return new JolokiaEndpoint(properties.getConfig());
}

@ -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.
@ -41,20 +41,19 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnClass(SpringLiquibase.class)
@ConditionalOnEnabledEndpoint(endpoint = LiquibaseEndpoint.class)
@AutoConfigureAfter(LiquibaseAutoConfiguration.class)
public class LiquibaseEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(SpringLiquibase.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public LiquibaseEndpoint liquibaseEndpoint(ApplicationContext context) {
return new LiquibaseEndpoint(context);
}
@Bean
@ConditionalOnBean(SpringLiquibase.class)
@ConditionalOnEnabledEndpoint(endpoint = LiquibaseEndpoint.class)
public static BeanPostProcessor preventDataSourceCloseBeanPostProcessor() {
return new BeanPostProcessor() {

@ -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.
@ -38,13 +38,13 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = LoggersEndpoint.class)
public class LoggersEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(LoggingSystem.class)
@Conditional(OnEnabledLoggingSystemCondition.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public LoggersEndpoint loggersEndpoint(LoggingSystem loggingSystem) {
return new LoggersEndpoint(loggingSystem);
}

@ -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.
@ -30,11 +30,11 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = HeapDumpWebEndpoint.class)
public class HeapDumpWebEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public HeapDumpWebEndpoint heapDumpWebEndpoint() {
return new HeapDumpWebEndpoint();
}

@ -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.
@ -30,11 +30,11 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = ThreadDumpEndpoint.class)
public class ThreadDumpEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public ThreadDumpEndpoint dumpEndpoint() {
return new ThreadDumpEndpoint();
}

@ -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.
@ -37,6 +37,7 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ConditionalOnClass(Timed.class)
@ConditionalOnEnabledEndpoint(endpoint = MetricsEndpoint.class)
@AutoConfigureAfter({ MetricsAutoConfiguration.class,
CompositeMeterRegistryAutoConfiguration.class })
public class MetricsEndpointAutoConfiguration {
@ -44,7 +45,6 @@ public class MetricsEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(MeterRegistry.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public MetricsEndpoint metricsEndpoint(MeterRegistry registry) {
return new MetricsEndpoint(registry);
}

@ -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.
@ -82,10 +82,10 @@ public class PrometheusMetricsExportAutoConfiguration {
}
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = PrometheusScrapeEndpoint.class)
public static class PrometheusScrapeEndpointConfiguration {
@Bean
@ConditionalOnEnabledEndpoint
@ConditionalOnMissingBean
public PrometheusScrapeEndpoint prometheusEndpoint(
CollectorRegistry collectorRegistry) {

@ -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.
@ -34,11 +34,11 @@ import org.springframework.scheduling.config.ScheduledTaskHolder;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = ScheduledTasksEndpoint.class)
public class ScheduledTasksEndpointAutoConfiguration {
@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public ScheduledTasksEndpoint scheduledTasksEndpoint(
ObjectProvider<ScheduledTaskHolder> holders) {
return new ScheduledTasksEndpoint(

@ -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,13 +37,13 @@ import org.springframework.session.Session;
*/
@Configuration
@ConditionalOnClass(FindByIndexNameSessionRepository.class)
@ConditionalOnEnabledEndpoint(endpoint = SessionsEndpoint.class)
@AutoConfigureAfter(SessionAutoConfiguration.class)
public class SessionsEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(FindByIndexNameSessionRepository.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public SessionsEndpoint sessionEndpoint(
FindByIndexNameSessionRepository<? extends Session> sessionRepository) {
return new SessionsEndpoint(sessionRepository);

@ -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.
@ -33,13 +33,13 @@ import org.springframework.context.annotation.Configuration;
* @since 2.0.0
*/
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = HttpTraceEndpoint.class)
@AutoConfigureAfter(HttpTraceAutoConfiguration.class)
public class HttpTraceEndpointAutoConfiguration {
@Bean
@ConditionalOnBean(HttpTraceRepository.class)
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
public HttpTraceEndpoint httpTraceEndpoint(HttpTraceRepository traceRepository) {
return new HttpTraceEndpoint(traceRepository);
}

@ -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.
@ -148,6 +148,14 @@ public class ConditionalOnEnabledEndpointTests {
.run((context) -> assertThat(context).hasBean("fooBar"));
}
@Test
public void outcomeWhenEndpointEnabledPropertyIsFalseOnClassShouldNotMatch() {
this.contextRunner.withPropertyValues("management.endpoint.foo.enabled=false")
.withUserConfiguration(
FooEndpointEnabledByDefaultTrueOnConfigurationConfiguration.class)
.run((context) -> assertThat(context).doesNotHaveBean("foo"));
}
@Endpoint(id = "foo", enableByDefault = true)
static class FooEndpointEnabledByDefaultTrue {
@ -193,6 +201,17 @@ public class ConditionalOnEnabledEndpointTests {
}
@Configuration
@ConditionalOnEnabledEndpoint(endpoint = FooEndpointEnabledByDefaultTrue.class)
static class FooEndpointEnabledByDefaultTrueOnConfigurationConfiguration {
@Bean
public FooEndpointEnabledByDefaultTrue foo() {
return new FooEndpointEnabledByDefaultTrue();
}
}
@Configuration
static class FooEndpointEnabledByDefaultFalseConfiguration {

Loading…
Cancel
Save