Optimize web configuration class loading

pull/639/head
chen.ma 2 years ago
parent 6c4ffa172d
commit 3c581168a1

@ -33,7 +33,6 @@ import org.springframework.core.env.ConfigurableEnvironment;
* Web adapter auto configuration.
*/
@Configuration
@ConditionalOnBean(value = {InetUtils.class})
@Import({WebThreadPoolHandlerConfiguration.EmbeddedTomcat.class,
WebThreadPoolHandlerConfiguration.EmbeddedJetty.class,
WebThreadPoolHandlerConfiguration.EmbeddedUndertow.class})

@ -28,5 +28,4 @@ public class WebAdapterConfigurationSelector implements DeferredImportSelector {
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
return new String[]{WebAdapterConfiguration.class.getName()};
}
}

@ -67,12 +67,12 @@ import org.springframework.core.env.ConfigurableEnvironment;
* Dynamic thread-pool auto-configuration.
*/
@Configuration
@EnableWebAdapter
@AllArgsConstructor
@ConditionalOnBean(MarkerConfiguration.Marker.class)
@EnableConfigurationProperties(BootstrapProperties.class)
@ConditionalOnProperty(prefix = BootstrapProperties.PREFIX, value = "enable", matchIfMissing = true, havingValue = "true")
@ImportAutoConfiguration({HttpClientConfiguration.class, NettyClientConfiguration.class, DiscoveryConfiguration.class, MessageConfiguration.class, UtilAutoConfiguration.class})
@EnableWebAdapter
public class DynamicThreadPoolAutoConfiguration {
private final BootstrapProperties properties;

Loading…
Cancel
Save