[bs-73] Anonymous classes cannot be used in @Bean definitions in .groovy scripts
* Added a test for each of the classes loaded by the SpringApplication * If it's an anonymous class or looks like a Groovy closure we ignore it * The CLI sample job.groovy also modified to take advantage [Fixes #48718891]
This commit is contained in:
@@ -14,7 +14,12 @@ class JobConfig {
|
||||
|
||||
@Bean
|
||||
protected Tasklet tasklet() {
|
||||
return new SampleTasklet()
|
||||
return new Tasklet() {
|
||||
@Override
|
||||
RepeatStatus execute(StepContribution contribution, ChunkContext context) {
|
||||
return RepeatStatus.FINISHED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -28,13 +33,6 @@ class JobConfig {
|
||||
}
|
||||
}
|
||||
|
||||
class SampleTasklet implements Tasklet {
|
||||
@Override
|
||||
RepeatStatus execute(StepContribution contribution, ChunkContext context) {
|
||||
return RepeatStatus.FINISHED
|
||||
}
|
||||
}
|
||||
|
||||
import org.springframework.util.StringUtils
|
||||
import groovy.util.logging.Log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user