Ensure AutoConfigurationReport is always present
This commit is contained in:
parent
b63016d8fc
commit
0c79c8913f
|
|
@ -22,17 +22,18 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Endpoint to serve up autoconfiguration report if actuator is on the classpath.
|
* Endpoint to serve up autoconfiguration report if actuator is on the classpath.
|
||||||
*
|
*
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties(name = "endpoints.autoconfigurationreport", ignoreUnknownFields = false)
|
@ConfigurationProperties(name = "endpoints.autoconfigurationreport", ignoreUnknownFields = false)
|
||||||
public class AutoConfigurationReportEndpoint extends AbstractEndpoint<AutoConfigurationReport> {
|
public class AutoConfigurationReportEndpoint extends
|
||||||
|
AbstractEndpoint<AutoConfigurationReport> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AutoConfigurationReport autoConfigurationReport;
|
private AutoConfigurationReport autoConfigurationReport;
|
||||||
|
|
||||||
public AutoConfigurationReportEndpoint() {
|
public AutoConfigurationReportEndpoint() {
|
||||||
super("/autoconfigurationreport");
|
super("/auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import org.springframework.boot.actuate.endpoint.InfoEndpoint;
|
||||||
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
|
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
|
||||||
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint;
|
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint;
|
||||||
import org.springframework.boot.actuate.endpoint.TraceEndpoint;
|
import org.springframework.boot.actuate.endpoint.TraceEndpoint;
|
||||||
import org.springframework.boot.autoconfigure.report.AutoConfigurationReportCreator;
|
import org.springframework.boot.autoconfigure.report.AutoConfigurationReport;
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
@ -74,12 +74,12 @@ public class EndpointAutoConfigurationTests {
|
||||||
@Test
|
@Test
|
||||||
public void autoconfigurationAuditEndpoints() {
|
public void autoconfigurationAuditEndpoints() {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.register(EndpointAutoConfiguration.class, AutoConfigurationReportCreator.class);
|
this.context.register(EndpointAutoConfiguration.class,
|
||||||
|
AutoConfigurationReport.class);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
assertNotNull(this.context.getBean(AutoConfigurationReportEndpoint.class));
|
assertNotNull(this.context.getBean(AutoConfigurationReportEndpoint.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testInfoEndpointConfiguration() throws Exception {
|
public void testInfoEndpointConfiguration() throws Exception {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
|
|
|
||||||
|
|
@ -16,28 +16,33 @@
|
||||||
|
|
||||||
package org.springframework.boot.actuate.endpoint;
|
package org.springframework.boot.actuate.endpoint;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.report.EnableAutoConfigurationReport;
|
import org.springframework.boot.autoconfigure.report.AutoConfigurationReport;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for {@link AutoConfigurationReportEndpoint}.
|
* Tests for {@link AutoConfigurationReportEndpoint}.
|
||||||
*
|
*
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
*/
|
*/
|
||||||
public class AutoConfigurationReportEndpointTests extends AbstractEndpointTests<AutoConfigurationReportEndpoint> {
|
public class AutoConfigurationReportEndpointTests extends
|
||||||
|
AbstractEndpointTests<AutoConfigurationReportEndpoint> {
|
||||||
|
|
||||||
public AutoConfigurationReportEndpointTests() {
|
public AutoConfigurationReportEndpointTests() {
|
||||||
super(Config.class, AutoConfigurationReportEndpoint.class,
|
super(Config.class, AutoConfigurationReportEndpoint.class, "/auto", true,
|
||||||
"/autoconfigurationreport", true, "endpoints.autoconfigurationreport");
|
"endpoints.autoconfigurationreport");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties
|
@EnableConfigurationProperties
|
||||||
@EnableAutoConfigurationReport
|
|
||||||
public static class Config {
|
public static class Config {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public AutoConfigurationReport autoConfigurationReport() {
|
||||||
|
return new AutoConfigurationReport();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AutoConfigurationReportEndpoint endpoint() {
|
public AutoConfigurationReportEndpoint endpoint() {
|
||||||
return new AutoConfigurationReportEndpoint();
|
return new AutoConfigurationReportEndpoint();
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,12 @@ import java.util.Set;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
import org.springframework.boot.autoconfigure.condition.Outcome;
|
import org.springframework.boot.autoconfigure.condition.Outcome;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
import org.springframework.context.annotation.ConditionContext;
|
import org.springframework.context.annotation.ConditionContext;
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
|
|
||||||
|
|
@ -46,6 +48,8 @@ import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
public class AutoConfigurationReport implements ApplicationContextAware,
|
public class AutoConfigurationReport implements ApplicationContextAware,
|
||||||
ApplicationListener<ContextRefreshedEvent> {
|
ApplicationListener<ContextRefreshedEvent> {
|
||||||
|
|
||||||
|
private static final String AUTO_CONFIGURATION_REPORT = "autoConfigurationReport";
|
||||||
|
|
||||||
private static Log logger = LogFactory.getLog(AutoConfigurationReport.class);
|
private static Log logger = LogFactory.getLog(AutoConfigurationReport.class);
|
||||||
|
|
||||||
private Set<CreatedBeanInfo> beansCreated = new LinkedHashSet<CreatedBeanInfo>();
|
private Set<CreatedBeanInfo> beansCreated = new LinkedHashSet<CreatedBeanInfo>();
|
||||||
|
|
@ -57,13 +61,27 @@ public class AutoConfigurationReport implements ApplicationContextAware,
|
||||||
|
|
||||||
public static void registerDecision(ConditionContext context, String message,
|
public static void registerDecision(ConditionContext context, String message,
|
||||||
String classOrMethodName, Outcome outcome) {
|
String classOrMethodName, Outcome outcome) {
|
||||||
if (context.getBeanFactory().containsBeanDefinition("autoConfigurationReport")) {
|
if (context.getBeanFactory().containsBeanDefinition(AUTO_CONFIGURATION_REPORT)
|
||||||
|
|| context.getBeanFactory().containsSingleton(AUTO_CONFIGURATION_REPORT)) {
|
||||||
AutoConfigurationReport autoconfigurationReport = context.getBeanFactory()
|
AutoConfigurationReport autoconfigurationReport = context.getBeanFactory()
|
||||||
.getBean(AutoConfigurationReport.class);
|
.getBean(AutoConfigurationReport.class);
|
||||||
autoconfigurationReport.registerDecision(message, classOrMethodName, outcome);
|
autoconfigurationReport.registerDecision(message, classOrMethodName, outcome);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AutoConfigurationReport registerReport(
|
||||||
|
ConfigurableApplicationContext applicationContext,
|
||||||
|
ConfigurableListableBeanFactory beanFactory) {
|
||||||
|
if (!beanFactory.containsBean(AutoConfigurationReport.AUTO_CONFIGURATION_REPORT)) {
|
||||||
|
AutoConfigurationReport report = new AutoConfigurationReport();
|
||||||
|
report.setApplicationContext(applicationContext);
|
||||||
|
beanFactory.registerSingleton(
|
||||||
|
AutoConfigurationReport.AUTO_CONFIGURATION_REPORT, report);
|
||||||
|
}
|
||||||
|
return beanFactory.getBean(AutoConfigurationReport.AUTO_CONFIGURATION_REPORT,
|
||||||
|
AutoConfigurationReport.class);
|
||||||
|
}
|
||||||
|
|
||||||
private void registerDecision(String message, String classOrMethodName,
|
private void registerDecision(String message, String classOrMethodName,
|
||||||
Outcome outcome) {
|
Outcome outcome) {
|
||||||
AutoConfigurationDecision decision = new AutoConfigurationDecision(message,
|
AutoConfigurationDecision decision = new AutoConfigurationDecision(message,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2013 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.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.springframework.boot.autoconfigure.report;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.SpringApplicationErrorHandler;
|
||||||
|
import org.springframework.context.ApplicationContextInitializer;
|
||||||
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Dave Syer
|
||||||
|
*/
|
||||||
|
public class AutoConfigurationReportApplicationContextInitializer implements
|
||||||
|
ApplicationContextInitializer<ConfigurableApplicationContext>,
|
||||||
|
SpringApplicationErrorHandler {
|
||||||
|
|
||||||
|
private AutoConfigurationReport report;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(ConfigurableApplicationContext applicationContext) {
|
||||||
|
ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory();
|
||||||
|
this.report = AutoConfigurationReport.registerReport(applicationContext,
|
||||||
|
beanFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handle(SpringApplication springApplication, String[] args, Throwable e) {
|
||||||
|
if (this.report != null) {
|
||||||
|
this.report.initialize(); // salvage a report if possible
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -20,3 +20,5 @@ org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration,\
|
org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration,\
|
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration,\
|
||||||
org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration
|
org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration
|
||||||
|
org.springframework.context.ApplicationContextInitializer=\
|
||||||
|
org.springframework.boot.autoconfigure.report.AutoConfigurationReportApplicationContextInitializer
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,6 @@
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure;
|
package org.springframework.boot.autoconfigure;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -30,8 +27,8 @@ import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
|
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.jms.JmsTemplateAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jms.JmsTemplateAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.report.AutoConfigurationReport;
|
import org.springframework.boot.autoconfigure.report.AutoConfigurationReport;
|
||||||
|
import org.springframework.boot.autoconfigure.report.AutoConfigurationReportApplicationContextInitializer;
|
||||||
import org.springframework.boot.autoconfigure.report.CreatedBeanInfo;
|
import org.springframework.boot.autoconfigure.report.CreatedBeanInfo;
|
||||||
import org.springframework.boot.autoconfigure.report.EnableAutoConfigurationReport;
|
|
||||||
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
|
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
@ -39,9 +36,12 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||||
import org.springframework.jms.core.JmsTemplate;
|
import org.springframework.jms.core.JmsTemplate;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for {@link AutoConfigurationReport}.
|
* Tests for {@link AutoConfigurationReport}.
|
||||||
*
|
*
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
*/
|
*/
|
||||||
public class AutoConfigurationReportTests {
|
public class AutoConfigurationReportTests {
|
||||||
|
|
@ -53,6 +53,8 @@ public class AutoConfigurationReportTests {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.register(TestConfiguration.class,
|
this.context.register(TestConfiguration.class,
|
||||||
PropertyPlaceholderAutoConfiguration.class);
|
PropertyPlaceholderAutoConfiguration.class);
|
||||||
|
new AutoConfigurationReportApplicationContextInitializer()
|
||||||
|
.initialize(this.context);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
AutoConfigurationReport autoconfigSettings = this.context
|
AutoConfigurationReport autoconfigSettings = this.context
|
||||||
.getBean(AutoConfigurationReport.class);
|
.getBean(AutoConfigurationReport.class);
|
||||||
|
|
@ -86,7 +88,8 @@ public class AutoConfigurationReportTests {
|
||||||
@Test
|
@Test
|
||||||
public void rabbitReportTest() {
|
public void rabbitReportTest() {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.register(TestConfiguration.class, RabbitAutoConfiguration.class);
|
this.context.register(TestConfiguration.class, RabbitAutoConfiguration.class,
|
||||||
|
AutoConfigurationReport.class);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
AutoConfigurationReport autoconfigSettings = this.context
|
AutoConfigurationReport autoconfigSettings = this.context
|
||||||
.getBean(AutoConfigurationReport.class);
|
.getBean(AutoConfigurationReport.class);
|
||||||
|
|
@ -117,13 +120,16 @@ public class AutoConfigurationReportTests {
|
||||||
totalDecisions += 1;
|
totalDecisions += 1;
|
||||||
if (decision.contains("RabbitConnectionFactoryCreator matched")) {
|
if (decision.contains("RabbitConnectionFactoryCreator matched")) {
|
||||||
foundRabbitConnectionFactory = true;
|
foundRabbitConnectionFactory = true;
|
||||||
} else if (decision.contains("OnExpressionCondition")
|
}
|
||||||
|
else if (decision.contains("OnExpressionCondition")
|
||||||
&& decision.contains("amqpAdmin matched due to SpEL expression")) {
|
&& decision.contains("amqpAdmin matched due to SpEL expression")) {
|
||||||
foundAmqpAdminExpressionCondition = true;
|
foundAmqpAdminExpressionCondition = true;
|
||||||
} else if (decision.contains("OnBeanCondition")
|
}
|
||||||
|
else if (decision.contains("OnBeanCondition")
|
||||||
&& decision.contains("amqpAdmin matched")) {
|
&& decision.contains("amqpAdmin matched")) {
|
||||||
foundAmqpAdminBeanCondition = true;
|
foundAmqpAdminBeanCondition = true;
|
||||||
} else if (decision.contains("rabbitTemplate matched")) {
|
}
|
||||||
|
else if (decision.contains("rabbitTemplate matched")) {
|
||||||
foundRabbitTemplateCondition = true;
|
foundRabbitTemplateCondition = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -139,7 +145,8 @@ public class AutoConfigurationReportTests {
|
||||||
public void verifyItGathersNegativeMatches() {
|
public void verifyItGathersNegativeMatches() {
|
||||||
this.context = new AnnotationConfigApplicationContext();
|
this.context = new AnnotationConfigApplicationContext();
|
||||||
this.context.register(TestConfiguration2.class,
|
this.context.register(TestConfiguration2.class,
|
||||||
JmsTemplateAutoConfiguration.class, MultipartAutoConfiguration.class);
|
JmsTemplateAutoConfiguration.class, MultipartAutoConfiguration.class,
|
||||||
|
AutoConfigurationReport.class);
|
||||||
this.context.refresh();
|
this.context.refresh();
|
||||||
AutoConfigurationReport autoconfigSettings = this.context
|
AutoConfigurationReport autoconfigSettings = this.context
|
||||||
.getBean(AutoConfigurationReport.class);
|
.getBean(AutoConfigurationReport.class);
|
||||||
|
|
@ -156,7 +163,8 @@ public class AutoConfigurationReportTests {
|
||||||
.contains("JmsTemplateAutoConfiguration#jmsTemplate did not match")
|
.contains("JmsTemplateAutoConfiguration#jmsTemplate did not match")
|
||||||
&& decision.contains("found the following [myOwnJmsTemplate]")) {
|
&& decision.contains("found the following [myOwnJmsTemplate]")) {
|
||||||
foundMyOwnJmsTemplateAndBackedOff = true;
|
foundMyOwnJmsTemplateAndBackedOff = true;
|
||||||
} else if (decision.contains("MultipartAutoConfiguration did not match")
|
}
|
||||||
|
else if (decision.contains("MultipartAutoConfiguration did not match")
|
||||||
&& decision
|
&& decision
|
||||||
.contains("list['javax.servlet.MultipartConfigElement']")
|
.contains("list['javax.servlet.MultipartConfigElement']")
|
||||||
&& decision.contains("found no beans")) {
|
&& decision.contains("found no beans")) {
|
||||||
|
|
@ -164,7 +172,8 @@ public class AutoConfigurationReportTests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// varying situations might cause multi-conditional beans to evaluate in different orders
|
// varying situations might cause multi-conditional beans to evaluate in different
|
||||||
|
// orders
|
||||||
assertTrue(totalNegativeDecisions >= 2);
|
assertTrue(totalNegativeDecisions >= 2);
|
||||||
assertTrue(foundMyOwnJmsTemplateAndBackedOff);
|
assertTrue(foundMyOwnJmsTemplateAndBackedOff);
|
||||||
assertTrue(didNotFindMultipartConfigElement);
|
assertTrue(didNotFindMultipartConfigElement);
|
||||||
|
|
@ -172,12 +181,10 @@ public class AutoConfigurationReportTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableAutoConfigurationReport
|
|
||||||
public static class TestConfiguration {
|
public static class TestConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableAutoConfigurationReport
|
|
||||||
public static class TestConfiguration2 {
|
public static class TestConfiguration2 {
|
||||||
@Bean
|
@Bean
|
||||||
JmsTemplate myOwnJmsTemplate(javax.jms.ConnectionFactory connectionFactory) {
|
JmsTemplate myOwnJmsTemplate(javax.jms.ConnectionFactory connectionFactory) {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||||
import org.springframework.boot.autoconfigure.report.EnableAutoConfigurationReport;
|
|
||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
@ -34,7 +33,6 @@ import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||||
|
|
||||||
@EnableAutoConfiguration
|
@EnableAutoConfiguration
|
||||||
@EnableAutoConfigurationReport
|
|
||||||
@ComponentScan
|
@ComponentScan
|
||||||
@Controller
|
@Controller
|
||||||
public class SampleSecureApplication extends WebMvcConfigurerAdapter {
|
public class SampleSecureApplication extends WebMvcConfigurerAdapter {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue