0

봄 구름 데이터 흐름 sftp 소스 시작 응용 프로그램 states that file name should be in the headers (mode=contents). 그러나이 소스를 로그 싱크에 연결하면 헤더가 아닌 일부 헤더 (예 : Content-Type)가 표시됩니다. 이 헤더를 사용하여 같은 이름의 파일을 S3에 업로드하고 싶습니다.봄 구름 데이터 흐름 sftp 소스 스타터 app file_name 헤더를 사용할 때

봄 서버 : Spring Cloud Data Flow Local Server (v1.2.3.RELEASE) 내 앱은 모든 here

스트림 정의에서 수입

: stream create --definition "sftp --remote-dir=/incoming --username=myuser --password=mypwd --host=myftp.company.io --mode=contents --filename-pattern=preloaded_file_2017_ --allow-unknown-keys=true | log" --name test_sftp_log

차이가되지 않습니다 --expression=#root --level=debug에 로그 응용 프로그램을 구성. 또한, 내 자신의 싱크를 작성하는 나는 그런 헤더는 소스에서

로그 조각을 존재 are in this gist

답변

1

이 링크의 울부 짖는 소리를 따르십시오 침몰하지 않는 오류 메시지를 얻을 file_name 헤더에 액세스하려고하는, 당신은 코드에 필요 자신의 Source을 입력하고 FileReadingMessageSource 다음에 수동으로 다운 스트림을 채우십시오. 그 다음에 만 내용과 적절한 헤더가있는 메시지를 대상에 보냅니다. https://github.com/spring-cloud-stream-app-starters/file/issues/9