Skip to content

Commit

Permalink
Update JobConfiguration.java
Browse files Browse the repository at this point in the history
Removed hint to the batch-job sample for spring-cloud#883
  • Loading branch information
alexarguello authored Apr 7, 2023
1 parent c6cd589 commit bdb315c
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.aop.SpringProxy;
import org.springframework.aop.framework.Advised;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.job.builder.JobBuilder;
Expand All @@ -35,15 +30,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportRuntimeHints;
import org.springframework.core.DecoratingProxy;
import org.springframework.transaction.PlatformTransactionManager;

/**
* @author Michael Minella
*/
@Configuration(proxyBeanMethods = false)
@ImportRuntimeHints(JobConfiguration.RuntimeHint.class)
public class JobConfiguration {

private static final Log logger = LogFactory.getLog(JobConfiguration.class);
Expand All @@ -67,16 +59,4 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon
.build();
}

static class RuntimeHint implements RuntimeHintsRegistrar {

@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
hints.proxies()
.registerJdkProxy(builder -> builder
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.launch.JobOperator"))
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class));
}

}

}

0 comments on commit bdb315c

Please sign in to comment.