Remove bean post processor warning

This commit is contained in:
Henning Poettker
2022-11-20 19:01:20 +01:00
parent e5b4db36f7
commit b8f5b0a1dc
5 changed files with 9 additions and 9 deletions

View File

@@ -26,7 +26,6 @@ import org.springframework.batch.core.SkipListener;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
@@ -60,14 +59,13 @@ import org.springframework.context.annotation.Lazy;
* @author Glenn Renfro
* @author Ali Shahbour
*/
@AutoConfiguration
@AutoConfiguration(after = SimpleTaskAutoConfiguration.class)
@ConditionalOnClass(Job.class)
@ConditionalOnBean({ Job.class, TaskLifecycleListener.class })
// @checkstyle:off
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events", name = "enabled", havingValue = "true",
matchIfMissing = true)
// @checkstyle:on
@AutoConfigureAfter(SimpleTaskAutoConfiguration.class)
public class BatchEventAutoConfiguration {
/**
@@ -107,7 +105,7 @@ public class BatchEventAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public TaskBatchEventListenerBeanPostProcessor batchTaskEventListenerBeanPostProcessor() {
public static TaskBatchEventListenerBeanPostProcessor batchTaskEventListenerBeanPostProcessor() {
return new TaskBatchEventListenerBeanPostProcessor();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2016-2019 the original author or authors.
* Copyright 2016-2022 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.
@@ -115,7 +115,7 @@ public class TaskBatchEventListenerBeanPostProcessorTests {
public static class TestConfiguration {
@Bean
public TaskBatchEventListenerBeanPostProcessor taskBatchEventListenerBeanPostProcessor() {
public static TaskBatchEventListenerBeanPostProcessor taskBatchEventListenerBeanPostProcessor() {
return new TaskBatchEventListenerBeanPostProcessor();
}