|
29 | 29 | // PMD: "All methods are static" here because it's a program entry point.
|
30 | 30 | // CheckStyle: I cannot declare the constructor as private because app won't start.
|
31 | 31 | @SuppressWarnings({ "PMD.UseUtilityClass", "checkstyle:hideutilityclassconstructor" })
|
32 |
| -@EnableAutoConfiguration |
33 |
| -@Import({ |
34 |
| - ApplicationContext.class, |
35 |
| - DispatcherServletContext.class, |
36 |
| - ThymeleafViewResolverInitializingBean.class, |
37 |
| - JettyWebServerFactoryCustomizer.class, |
38 |
| - ErrorPagesCustomizer.class |
39 |
| -}) |
40 | 32 | public class ApplicationBootstrap {
|
41 | 33 |
|
42 | 34 | public static void main(String... args) {
|
43 | 35 | ConfigurableApplicationContext context =
|
44 |
| - SpringApplication.run(ApplicationBootstrap.class, args); |
| 36 | + SpringApplication.run(DefaultStartup.class, args); |
45 | 37 |
|
46 | 38 | FeatureManager featureManager = context.getBean(FeatureManager.class);
|
47 | 39 | StaticFeatureManagerProvider.setFeatureManager(featureManager);
|
48 | 40 | }
|
| 41 | + |
| 42 | + @EnableAutoConfiguration |
| 43 | + @Import({ |
| 44 | + ApplicationContext.class, |
| 45 | + DispatcherServletContext.class, |
| 46 | + ThymeleafViewResolverInitializingBean.class, |
| 47 | + JettyWebServerFactoryCustomizer.class, |
| 48 | + ErrorPagesCustomizer.class |
| 49 | + }) |
| 50 | + public static class DefaultStartup { |
| 51 | + } |
49 | 52 |
|
50 | 53 | }
|
0 commit comments