Merge pull request #34140 from izeye

* gh-34140:
  Polish "Set Reactor Netty's shutdownQuietPeriod to 0 when using devtools"

Closes gh-34140
pull/31258/merge
Andy Wilkinson 2 years ago
commit ba6605d532

@ -35,12 +35,12 @@ public final class ReactorNettyConfigurations {
} }
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(ReactorNettyConfigurationProperties.class) @EnableConfigurationProperties(ReactorNettyProperties.class)
public static class ReactorResourceFactoryConfiguration { public static class ReactorResourceFactoryConfiguration {
@Bean @Bean
@ConditionalOnMissingBean @ConditionalOnMissingBean
ReactorResourceFactory reactorResourceFactory(ReactorNettyConfigurationProperties configurationProperties) { ReactorResourceFactory reactorResourceFactory(ReactorNettyProperties configurationProperties) {
ReactorResourceFactory reactorResourceFactory = new ReactorResourceFactory(); ReactorResourceFactory reactorResourceFactory = new ReactorResourceFactory();
if (configurationProperties.getShutdownQuietPeriod() != null) { if (configurationProperties.getShutdownQuietPeriod() != null) {
reactorResourceFactory.setShutdownQuietPeriod(configurationProperties.getShutdownQuietPeriod()); reactorResourceFactory.setShutdownQuietPeriod(configurationProperties.getShutdownQuietPeriod());

@ -21,16 +21,16 @@ import java.time.Duration;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
/** /**
* Configuration properties for Reactor Netty configuration. * Configuration properties for Reactor Netty.
* *
* @author Moritz Halbritter * @author Moritz Halbritter
* @since 2.7.9 * @since 2.7.9
*/ */
@ConfigurationProperties(prefix = "spring.reactor.netty") @ConfigurationProperties(prefix = "spring.reactor.netty")
public class ReactorNettyConfigurationProperties { public class ReactorNettyProperties {
/** /**
* Configure the amount of time to wait before shutting down resources. * Amount of time to wait before shutting down resources.
*/ */
private Duration shutdownQuietPeriod; private Duration shutdownQuietPeriod;

@ -9,8 +9,8 @@ spring.groovy.template.cache=false
spring.h2.console.enabled=true spring.h2.console.enabled=true
spring.mustache.servlet.cache=false spring.mustache.servlet.cache=false
spring.mvc.log-resolved-exception=true spring.mvc.log-resolved-exception=true
spring.reactor.netty.shutdown-quiet-period=0s
spring.template.provider.cache=false spring.template.provider.cache=false
spring.thymeleaf.cache=false spring.thymeleaf.cache=false
spring.web.resources.cache.period=0 spring.web.resources.cache.period=0
spring.web.resources.chain.cache=false spring.web.resources.chain.cache=false
spring.reactor.netty.shutdown-quiet-period=0s

Loading…
Cancel
Save