Productivity for Programmers
Productivity for Programmers
  • 17
  • 243 447
Spring Boot: How to fix connection refused errors after code changes (ECONNREFUSED during reloads)
When using Spring Boot together with spring-boot-devtools, when it detects a class file change, a restart will trigger that will temporarily make the web server unavailable. This means that while a restart is happening, the REST API client that we're using might get a connection error. The problem is made worse as the application becomes bigger and restarts start taking longer (Quarkus and Play framework do not have this problem).
To solve this problem, I developed a simple web server (in Golang) that will detect source file changes and trigger a rebuild. After a rebuild, spring-boot-devtools will take care of restarting the application. During the rebuild and restart process, the web server will pause requests until the health check passes (provided by spring-boot-starter-actuator). Once the health check passes, the connections will be forwarded to the Spring Boot application.
To use this web server:
a.) Your Spring Boot application must have both spring-boot-devtools and spring-boot-starter-actuator as a dependency.
b.) You must point your API client (postman/insomnia/httpie) to this web server rather than to the Spring Boot application's web server.
The source code for this web server is available at:
github.com/productivity-for-programmers/productivity-for-spring
Переглядів: 827

Відео

Is FerretDB a drop-in replacement for MongoDB? (First Impressions with Java and Morphia)
Переглядів 489Рік тому
I love MongoDB but I sometimes have a nervous feeling about being locked in to a database product. FerretDB is an alternative to MongoDB that implements the MongoDB wire protocol and thus enables it to be drop in replacement for MongoDB (assuming that the subset of MongoDB features that you are using has been implemented by FerretDB). FerretDB's website: www.ferretdb.io/ docker-compose file: do...
ANTV X6 JavaScript Diagramming Library: Lets build a workflow editor (Drag and Drop Nodes)
Переглядів 11 тис.Рік тому
I predict that low code and no-code tools will be a standard part of software user interfaces in the near future. Gone will be the days where we use a third party low code/no code tools to allow our end users to customize our software. Instead, end users will expect that we build this customizability directly into our applications. For that to happen, we need to be able to add some kind of visu...
Gantt charts as code with PlantUML
Переглядів 2,4 тис.2 роки тому
It wasn't intuitive to me at first but project plans are a set of rules, variables and constraints so it actually makes a lot of sense to describe them in code form rather than by using a graphical tool such as Microsoft Project. In this video I'm going to show one such tool, PlantUML, that lets you define project plans (Gantt charts) in text form. PlantUML Website: plantuml.com/ Documentation ...
Tablesaw: The EASIEST way to process tables in Java (Data Frames / Pandas like)
Переглядів 18 тис.2 роки тому
The world runs on CSV files so it's always great to have multiple methods for processing them in your toolbelt. In this video, I'm going to talk about a library called tablesaw that provides an ergonomic interface for processing tabular datasets. It's so ergonomic that it's quite usable in interactive mode which is huge for a language that is as verbose as Java. With tablesaw you can perform mo...
Modern Java: Download and Upload Files from SFTP Servers from Java using the sshj library
Переглядів 4,3 тис.2 роки тому
In my first video on writing SFTP clients in Java I used a library called jsch. jsch does what it claims but it does feel a little bit dated. The Java library that I’m going to show today is called sshj (github.com/hierynomus/sshj) and it has a much more modern feel to it. Advantages of using sshj over jsch: - Supports "BEGIN OPENSSH PRIVATE KEY" style private keys out of the box - Uses the Jav...
PowerShell Tutorial: Downloading and Uploading Files from SFTP Servers (using Posh-SSH)
Переглядів 7 тис.3 роки тому
I'm really enjoying using PowerShell. You can do quite a lot by just learning a few basic features. One task that I do often is accessing SFTP servers and I wanted to put my recently acquired knowledge on PowerShell to good use by seeing how good it would be at automating common SFTP tasks. In this video, I'm going to show you PowerShell code for connecting to SFTP servers (using username/passw...
Fault Injection: Simulating Errors in REST APIs using Envoy Proxy
Переглядів 7513 роки тому
Have you ever wanted to test how your application behaves when certain APIs and services that it depends on aren't working correctly. This can be done using a category of tools called fault injection tools. In this video I'm going to explore the fault injection features of Envoy Proxy. Envoy version used: 1.18.3 00:00 Intro 03:01 Basic Envoy reverse proxy configuration 04:53 Injecting abort wit...
jsPlumb Tutorial: Add Diagramming Features to your Javascript Projects (Build a Workflow Editor)
Переглядів 12 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) One of my side projects is building a low code workflow tool that helps power users design and automate file transfer/SFTP related business processes. One of the components of this workflow tool is a graphical workflow editor that allows users to create a ...
Airflow Tutorial: Automate SFTP Operations using Apache Airflow
Переглядів 17 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) I do so much work with SFTP servers that I have been looking for solutions to help automate some of this repetitive work. One possible solution that I have been looking into is Apache Airflow. In this video, I give a tour of Apache Airflow's features and h...
Download and Upload Files from SFTP Servers from Java Applications using the JSch library
Переглядів 22 тис.3 роки тому
In this video I'll cover how the following SFTP operations can be performed by a Java program using the JSch library: - Connecting to SFTP servers - Authenticating to SFTP servers - Listing directories - Changing directories - Downloading files - Uploading files I also cover how to handle the following errors: - com.jcraft.jsch.JSchException: invalid privatekey - com.jcraft.jsch.JSchException: ...
SFTP Server on Window: Troubleshooting Permission denied (publickey,keyboard-interactive)
Переглядів 8 тис.3 роки тому
While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds) I did this video because quite a number of people commented that they were getting 'Permission denied' errors when following the instructions from my earlier video - Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of Open...
Command Line CSV File Processing with Miller - Stop Using Python for Basic CSV Tasks!
Переглядів 2,1 тис.3 роки тому
Miller is a command line tool for processing CSV files. Often times the lowest common denominator for integrating two systems is a CSV file. Usually I would resort to Python scripts for processing these CSV files. However, for simple operations creating a one off script would be overkill. This is where Miller comes in. It is like a swiss army knife for CSV file processing. It includes what it c...
Kubernetes Cron/CronJobs in 10 minutes
Переглядів 36 тис.4 роки тому
Reference: kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/ Time must be in the UTC timezone: github.com/kubernetes/kubernetes/issues/78795 While not necessary, if you enjoyed this video, buying me a coffee is greatly appreciated! www.buymeacoffee.com/prodprogrammers (no refunds)
Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of OpenSSH)
Переглядів 85 тис.4 роки тому
Setting up an SFTP Server on Windows (Server) with OpenSSH (using Microsoft's port of OpenSSH)
Financier: (Really) Straight-forward personal budgeting software
Переглядів 1,1 тис.4 роки тому
Financier: (Really) Straight-forward personal budgeting software
Productivity Tools for Programmers: IntelliJ HTTP Client (Alternative to Postman)
Переглядів 16 тис.4 роки тому
Productivity Tools for Programmers: IntelliJ HTTP Client (Alternative to Postman)

КОМЕНТАРІ

  • @MuhammadAkram-de9jf
    @MuhammadAkram-de9jf 3 дні тому

    This is really good vedio for sftp upload/download files using ssh pem key. I have search for this topic a lot but only find this vedio relevant to my problem regarding sftp ssh file upload. Thank you very much.

  • @PG22_Hello
    @PG22_Hello 3 дні тому

    “Live on last months income” with the option to assign income to future months was the BEST part of YNAB and they blew it.

  • @brahimsenhaji
    @brahimsenhaji Місяць тому

    How can you get the start and the end point of the edge

  • @rajeshcr9800
    @rajeshcr9800 2 місяці тому

    Car user... This command not working in windows

  • @YTonYahoo
    @YTonYahoo 4 місяці тому

    cool

  • @DavidNurbin
    @DavidNurbin 5 місяців тому

    Very Useful and educational.

  • @user-jv3rd5dr5z
    @user-jv3rd5dr5z 5 місяців тому

    Hi bro, when I try to download the file using get method, instead of getting copy of the file, getting deleted in server.Please suggest on how this issue can be fixed.

    • @ProductivityforProgrammers
      @ProductivityforProgrammers 5 місяців тому

      Hello, did you solve your problem yet? I would test this using another SFTP tool first to see whether it has the same behavior - if it does, then it's something to do with the server.

  • @wfung8572
    @wfung8572 7 місяців тому

    How to allow Sftp but disallow Ssh in Server22?

    • @ProductivityforProgrammers
      @ProductivityforProgrammers 7 місяців тому

      Are you able to get an SSH shell? My understanding is that the ForceCommand directive should prevent that.

    • @wfung8572
      @wfung8572 7 місяців тому

      How to do so? Tried different ways but seems failed. Tks

    • @ProductivityforProgrammers
      @ProductivityforProgrammers 7 місяців тому

      Try using: ForceCommand internal-sftp Let me know if that doesn't work for you.

  • @Vishwanathasetty
    @Vishwanathasetty 8 місяців тому

    Is the code available for practice?

  • @DeepakAggarwal-sc7cm
    @DeepakAggarwal-sc7cm 8 місяців тому

    where will be history saved ?

  • @ruqbanali
    @ruqbanali 8 місяців тому

    How to console.log the svg in console using graph.toSVG(), i am having problem doing that.

  • @ayushmandloi1580
    @ayushmandloi1580 9 місяців тому

    Is this same for Cloud Composer also ?

  • @higiniofuentes2551
    @higiniofuentes2551 9 місяців тому

    Thank you for this very useful video!

  • @higiniofuentes2551
    @higiniofuentes2551 9 місяців тому

    Thank you for this very useful video!

    • @ProductivityforProgrammers
      @ProductivityforProgrammers 9 місяців тому

      Thank you. Please do subscribe if you would like to be notified of future videos.

  • @fygure8756
    @fygure8756 9 місяців тому

    This is cool, what are the pros cons using this over plumbjs or jointjs? I am deciding on which to use for my web application regarding sport play diagramming

    • @ProductivityforProgrammers
      @ProductivityforProgrammers 9 місяців тому

      I don't have a straight answer here. It's tough to say because I think it's quite use case specific. I would look at the demo/example projects from jsplumb/jointjs/x6 and find one that is most similar to your use case and evaluate it from there. All three of them have lots of sample projects.

    • @fygure8756
      @fygure8756 9 місяців тому

      thank you for replying cheers :D@@ProductivityforProgrammers

  • @ulrichschmidt5559
    @ulrichschmidt5559 11 місяців тому

    Thanks a lot for doing this Video! I found the link in the discussion section of the sshj Github project, while desperately looking for some kind of JavaDoc or anything going a bit beyond the "very rudimentary" examples available there... Your tutorial saved me many hours of trial & error. 👍 BTW: did you also take a look at the Apache Mina project? Still trying to make up my mind, whether Apache Mina or sshj would be the better choice for me...

  • @pawebb
    @pawebb 11 місяців тому

    Looks like the creators copied YNAB4.

  • @MohammadIfam1
    @MohammadIfam1 11 місяців тому

    Thank you very much.

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

    Hi there ;) I have a little question: Situation that you have many folders and many users to see this folders. I try with Match Group, and works.... but if you have other folder with the some user ...in my case only matchs the first line. Have any solution for this cases. thank you

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

    dd.html:121 Uncaught ReferenceError: jsPlumb is not defined at dd.html:121:3 im getting jsplumb not defined error while running your source code can u please help

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

    i have used the same code given in the description, but i am not able to drag elements and connect them. can you help me why it is giving an error

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

    Hi, I need some help. I have a Maven project and I need to upload files from my views (with html input fields). When I upload a file it only has 100 KB. I think this is a WinSCP configuration. Can you help me?

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

      If I understand you correctly, the the file is getting truncated i.e it is actually larger than 100kb. I would check the size of the file at controller layer before it is uploaded to the SFTP server to determine whether it's getting truncated there or after the upload to the SFTP server.

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

      @@ProductivityforProgrammers I already solved this problem. I saved the file into a temp folder and then send it trought sftp. It works fine.

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

    Hi, thanks for this great tutorial. Can you prepare a new tutorial for a third option: Apache Commons VFS ??

  • @sean-qo4vc
    @sean-qo4vc Рік тому

    Hi I have been setting up an sftp server for the last 2 weeks and your video has really helped

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

    thanks for the great video chief!

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

    Thank you bro

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

    is the Http Client only available for the Ultimate edition and not on community edition?

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

      Unfortunately, yes, but there is a very similar plugin for VS code that has a similar syntax called 'REST Client' marketplace.visualstudio.com/items?itemName=humao.rest-client

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

    That really helped a lot !!

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

    Please keep doing these videos

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

    this is exactly what i needed. how easy is it to retrieve connections afterwards? i.e. click a button and have a report generated indicating where each connection is made...

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

      Hello, if you’re referring to JSON export, I think that’s a feature of the commercial edition. Have a look at my video on ANTV X6 for a similar library that has this feature built in.

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

      Thank you for reply. I'll check it out ☺️

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

      Let me know if that isn’t what you were looking for

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

    I'm interested in bpmn type of diagrams with vertical resizable lanes. Does x6 handle these kinds of scenarios? Thanks

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

      Hello. Thanks for your question. There is a swimlane example on the ANTV X6 examples page. Hope that helps!

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

      I figured it out

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

    This is amazing. I’ll now follow the entire series

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

      Thank you for the kind words. Let me know if there are any adjacent topics that you would like videos on and please subscribe if you haven’t already.

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

      @@ProductivityforProgrammers Similar sessions on Kubernetes Jobs, Replication sets, PV, Ingress Controller, Gateways, VirtualService. There's a long list of things you can take up. If I can help either in preparation, evaluation, more than happy

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

    Hi, great tutorial. How should this line of code from last part of tutorial: os.write("abcdef".getBytes(StandardCharsets.UTF_8); looks like if instead on single String we want to use strings from List<String> each should be in a separate line?

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

      Hello thanks for watching the video! Yup, I would use a separate lines OR a loop OR stream().forEach().

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

    Hi, how are you running Java in JupyterLab. How did you install the Java Kernel in Jupyterlab environment.

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

      Hi! I used this kernel: github.com/SpencerPark/IJava However, there are some issues with getting some Java libraries to work when loaded using the "%maven" command so what I had to do was edit kernel.json to change the startup command for the JVM to include a directory containing all the JAR files that I wanted to use.

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

      @@ProductivityforProgrammers Hi there, and thanks for your reply. So you I guess manually downloaded the JAR files you wanted and put them in a directory and edited the kernel.json file. Since I am using Anaconda, I guess would they be using the same file name as this kernel.json?

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

      I am using Docker, will upload my scripts within this week for your reference.

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

    pls any one help me how to access one user to more directory

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

      I would look into tweaking or removing the ChrootDirectory. Let me know if that works for you.

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

    Thanks for the great explainer video. I would like to understand the layers, for example if X6 can align the nodes of a graph using not the built-in layout, but some orthogonal layout (like plantuml).

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

      Hi! If I understand you correctly, you want to be able to use a custom layout algorithm. I don't have a good answer for you at the moment but thank you so much for the question. Is the JS code for the layout algorithm that you would like to use open source? I can have a look and propose ways to integrate it.

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

    very helpful video

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

    Hi! I discovered that library some few months back.As you said is a pandas-like library for Java. I wanna see more videos about Tablesaw! Your explanation and demo are great! I didn't know to set up jupiter and Java. Thanks!!!

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

    Thank you. The last part with your own experience is especially valuable.

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

    What of the convert to PDf ? Please give me tutorial .. ;)

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

      Thanks for the question. Try exporting to svg and then using svg2pdf on the server. Let me know if that works for you.

  • @basheeral-momani2032
    @basheeral-momani2032 Рік тому

    awesome one thanks for sharing

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

    Thanks a ton. This tutorial was really helpful.

  • @basheeral-momani2032
    @basheeral-momani2032 Рік тому

    thanks a lot, looking for more tips

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

      Let me know what kind of tips that you're looking for.

    • @basheeral-momani2032
      @basheeral-momani2032 Рік тому

      @@ProductivityforProgrammers is there a way to run SQL query and get visualization options notebooks, how we could incopirate jupyter notebooks and databases?

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

      For advance use cases like this you probably want to look at Karate.

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

    What a great explanation, thanks a lot! You saved me :) I did this installation step by step for the one of the Global company I do provide consultancy and I just want inform other colleagues these: If you get an "Connection Closed (WSARecv error in .ssh\logs file)" error message after 16:07 sftp username@localhost step; You can add OpenSSH folder path to the Environment Variables path section. - run sysdm.cpl via Run - At the Advanced tab Click Environment Variable - Edit the Path section and add your C:\Program Files\OpenSSH path as well via the Browse option, and try again, solved.

  • @AnjaliGupta-eu2gd
    @AnjaliGupta-eu2gd Рік тому

    Hi, Thankyou so much for this informative video. It helps me a lot and I loved this video. But I need some more information about this topic

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

      Hello, thank you very much for your feedback. Let me know what other information you need on this topic. I'll see whether I can help you out.

    • @AnjaliGupta-eu2gd
      @AnjaliGupta-eu2gd Рік тому

      Can we add database connection into this to validate our response details??

    • @AnjaliGupta-eu2gd
      @AnjaliGupta-eu2gd Рік тому

      I have to end to end validation with this so I need database validation also

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

      I don't think it has this level of flexibility. You might want to look at Karate if you need something like that.

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

    Great video ! The explanations are very clear.

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

    would love to see the future video of the simple workflow engine. does that exist? this is most helpful thanks

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

      Hello! The workflow engine doesn't exist yet but I will do videos on it when the time comes.

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

      I just released another video on a similar library - ua-cam.com/video/EMtcA5z1fAg/v-deo.html

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

    thank you for simple example

  • @mohammednoural-rawabdeh5659

    awesome work

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

    Great video. Gonna have to give tables away a try soon,

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

      Thank you, I'm trying to raise awareness of this library because it's one of those hidden gems.