``` @Bean open fun etlFlow(messageSource: Mes...
# spring
s
Copy code
@Bean
    open fun etlFlow(messageSource: MessageSource<File>,
                     @Qualifier (BatchApplication.JOB_NAME) etlJob: Job): IntegrationFlow {

        open class X : GenericHandler <File> {
            override fun handle(file: File, p1: MutableMap<String, Any>?): Any? {
                println("absolute path: ${file.absolutePath}")
                return null
            }
        }

        val gh: GenericHandler<File> = GenericHandler { file, headers ->
            println (file.absoluteFile)
            null
        }

        return IntegrationFlows
                .from(messageSource, Consumer<SourcePollingChannelAdapterSpec> {
                    it.poller({ pf -> pf.fixedRate(1000 * 10) })
                })
                .handle(File::class.java, X())
                .get()
    }