org.zodiac.autoconfigure.runtime.RuntimeAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.runtime;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.runtime.async.AsyncTaskProperties;
import org.zodiac.core.runtime.async.AsyncProxyBeanPostProcessor;
import org.zodiac.core.runtime.async.AsyncTaskExecutorListener;
@SpringBootConfiguration
@EnableConfigurationProperties(value = {AsyncTaskProperties.class})
public class RuntimeAutoConfiguration {
@Bean
@ConditionalOnMissingBean
protected AsyncTaskExecutorListener asyncTaskExecutionListener() {
return new AsyncTaskExecutorListener();
}
@Bean
@ConditionalOnMissingBean
public static AsyncProxyBeanPostProcessor asyncProxyBeanPostProcessor() {
return new AsyncProxyBeanPostProcessor();
}
}