Spring Boot and Sftp - Avoid ftp and ftps if possible

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 50

  • @HossHopf-Annekdoten
    @HossHopf-Annekdoten Рік тому +1

    Thank you for this amazing Video! ^^ You were a great help!

  • @xavierangeles3828
    @xavierangeles3828 2 роки тому +1

    It’s ok, but what if I have the spring boot project and deploy it in a server than doesn’t reach the dev sftp server in junit test, how can i mock a sftp server connection in junit tests?

  • @AdamGiri514
    @AdamGiri514 3 роки тому +1

    How to implement expect-ct header in spring with report-uri
    Please make on video

    • @MikesTechCorner
      @MikesTechCorner  3 роки тому

      I have quite a long back log... But... Added to backlog.

  • @denisr.8248
    @denisr.8248 2 роки тому +1

    Can you please 1 video how we setup this demo surver as well ty

    • @MikesTechCorner
      @MikesTechCorner  2 роки тому

      Clone the project and use the docker-compose file to start up filezilla sftp server.

  • @kunteajit
    @kunteajit 3 роки тому +1

    Any example of connecting sftp server using private key file using camel.

    • @MikesTechCorner
      @MikesTechCorner  3 роки тому +1

      Excellent idea! I will dig into Camel soon. Added to backlog.

  • @superman-yb3gi
    @superman-yb3gi Рік тому +1

    Hi,
    What about the session closure is that handled by spring itself

    • @MikesTechCorner
      @MikesTechCorner  Рік тому

      Yes it is. If you want to control it your self then use Apache Common FTPClient commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html

  • @selvasun4491
    @selvasun4491 Рік тому +1

    This is very useful to understand.

  • @arnabmukherjee4513
    @arnabmukherjee4513 5 років тому +2

    This is very helpful to understand the concept. How do I download multiple files from the SFTP folder? Can I do a loop over filenames after fetching them from the remote folder?

    • @MikesTechCorner
      @MikesTechCorner  5 років тому +1

      Yes thats quite easy. Ill see if I have time to create a video about that soon.

    • @arnabmukherjee4513
      @arnabmukherjee4513 5 років тому +1

      @@MikesTechCorner Thanks for your response!!

    • @MikesTechCorner
      @MikesTechCorner  5 років тому

      @@arnabmukherjee4513 ill make another video when I have time

  • @anug14
    @anug14 4 роки тому +1

    How do we deal with scanning the files we upload into server? We basically uploaded the file and antivirus was running continuously and we would sort of wait for few seconds and if they were still present, the file is good and if they were not we would mark the file entry in db as invalid and user has to upload again.

    • @MikesTechCorner
      @MikesTechCorner  4 роки тому

      You dont scan the "uploading"-folder. Then the client moves the file from "uploading" to "done" and then you scan the "done" directory.

  • @ganeshcbhanage
    @ganeshcbhanage 4 роки тому +1

    how about streaming a large file from sftp server. Don't want to download entire file locally

  • @JedColina
    @JedColina 5 років тому +2

    DO you have an example connecting through FTPS?

    • @MikesTechCorner
      @MikesTechCorner  5 років тому

      No. Use sftp instead! Ill make an example with Spring Integration soon.

    • @JedColina
      @JedColina 5 років тому +1

      you dont recommend using FTPS?
      it could be nice if you also have an example with FTPS. thanks for the video Mike!

    • @MikesTechCorner
      @MikesTechCorner  5 років тому +1

      @@JedColina ok ill make a ftps video

    • @denisr.8248
      @denisr.8248 2 роки тому

      @@MikesTechCorner DId you made with FTPS as well ? i am interested in it

  • @adermaulana9286
    @adermaulana9286 3 роки тому +1

    Hi sir, how to connect filezilla before running project, i'm so confused ?

    • @MikesTechCorner
      @MikesTechCorner  3 роки тому

      Filezilla is the client / GUI to connect to a sftp server. Just like my Spring app is a client of a sftp server. I spin up a sftp server using docker.

  • @saravanajagan418
    @saravanajagan418 4 роки тому +2

    how to download the file and store in a location? instead of reading the content...

    • @MikesTechCorner
      @MikesTechCorner  4 роки тому

      Try to watch the other sftp videos. "... Storage..."

    • @bestksd
      @bestksd 4 роки тому

      @@MikesTechCorner where is video you mean Mr @Mike

    • @MikesTechCorner
      @MikesTechCorner  4 роки тому

      Search in my channel :) sftp

  • @eimaisklhros
    @eimaisklhros 4 роки тому +1

    Getting an error at return from gimmeFactory()
    The error is NoSuchMethodError: org.springframework.integration.util.Javautils.acceptIfHasText(etc etc)
    Basically acceptIfHasText throws the error inside the DefaultSftpSessionFactory.class
    I wonder if it has something to do about jschSession::setConfig.
    I use maven and I have installed the dependency as seen in the official spring doc, SFTP Adapters.
    If you could help it would be great.
    You have awesome content in your channel!

    • @MikesTechCorner
      @MikesTechCorner  4 роки тому

      Try to clone my project and run the code again.

  • @sudarshanshere
    @sudarshanshere 4 роки тому

    I am facing a problem the file is getting partially written. Only 32.6 Kb is getting written to the remote server.. The written file is corrupted.. How do we resolve this?
    Is there a file size limit?

    • @MikesTechCorner
      @MikesTechCorner  4 роки тому

      If you get the exception MaxUploadSizeExceed then here's a good article: www.baeldung.com/spring-maxuploadsizeexceeded

    • @sudarshanshere
      @sudarshanshere 4 роки тому +1

      It's not a maxUploadSizeExceeded exception...
      It is truncating characters after 32kb..Its basically a problem with the jcraft jar which spring uses internally.. ChannelSftp.put... after the sessiontimeout of 30s u get an IOException Stream Closed..
      Not sure how to resolve this..

  • @solaima5425
    @solaima5425 5 років тому

    Thank you! Do I need to use the same process to use spring-integration-ftp?

    • @MikesTechCorner
      @MikesTechCorner  5 років тому +1

      Hi Solai. When I have time I will show an example with spring integration sftp and the annotation like @Gateway and @MessagingGateway. :-) Thank you for watching.

  • @pankajjaiswal7874
    @pankajjaiswal7874 3 роки тому

    Will this work to connect to IBM mainframe server ?

  • @krishnachavhan655
    @krishnachavhan655 5 років тому +1

    Thanks for good example :)

    • @MikesTechCorner
      @MikesTechCorner  5 років тому

      You are welcome. Thank you for watching my video. :)

  • @alanmangroo3656
    @alanmangroo3656 Рік тому

    Great video. Thanks!

  • @ainisofea515
    @ainisofea515 2 роки тому +1

    Thanks!

  • @gulshannayak5458
    @gulshannayak5458 3 роки тому +1

    thank you