Instructions for using JSch to connect Sftp

Preface Recently, I need to pass SSH Then on SFTP Connect, and then operate, so record here, convenient for future use, also convenient for everyone as a reference. text First of all, you need to make a dependency reference to JSch, and the project is built by gradle. Here is the build.gradle Code: // https://mvnrepository.com/arti ...

Posted on Fri, 13 Dec 2019 12:41:36 -0500 by jrmckee

Spring Boot using Spring Data JPA

In this tutorial, you will see how Spring Data JPA provides complete abstraction on the DAO layer. We no longer need to write an implementation for the DAO layer; Spring Data auto generation implements the DAO implementation. Dependency configuration In this tutorial, I use MySQL databases with Spring Data. This is the build.gradle file: buil ...

Posted on Fri, 13 Dec 2019 11:32:24 -0500 by kellerkind

Three special classes of javaSE -- Object class

Object class (realfamily) -- highest parameter unification (all classes can be converted to object class upward) The Object class is a class provided by JDK by default. In Java, except for the Object class, all classes have inheritance relationships, and the Object parent class will be inherited by default toString() -- ge ...

Posted on Fri, 13 Dec 2019 11:19:15 -0500 by lulubell

Spring boot2.2 upload file example

Upload file code controller public class PicController { //Inject asynchronous thread pool @Autowired private FileThreadPool fileThreadPool; @Autowired private FileService fileService; /** * Image upload interface * * @param uploadFiles * @param filePath */ @RequestMapping("/") public v ...

Posted on Fri, 13 Dec 2019 11:18:14 -0500 by mevasquez

Spring cloud IV (Zuul api gateway)

Spring Cloud - Zuul api gateway I. Introduction to Zuul API When building microservices, we will face the problem of providing a unique gateway for client applications, that is, services are divided into small microservice applications, which are not visible to users, otherwise, it may lead to a lot of development / mainten ...

Posted on Fri, 13 Dec 2019 10:05:18 -0500 by xmrcivicboix

Let you quickly understand the fair lock and unfair lock in Java lock

Preface There are many native thread safe data structures in Java language, such as ArrayBlockingQueue, CopyOnWriteArrayList, LinkedBlockingQueue. Their thread safety is realized not by synchronized keyword, but by java.util.concurrent.locks.ReentrantLock. The underlying implementation of lock No matter what language, the lock operation at ...

Posted on Fri, 13 Dec 2019 06:12:25 -0500 by pspfreak101

Introduction to SOLID design principles for Java developers

Take a look at this introduction to SOLID design principles for Java developers.Stripping cocoons and detailing the structure of those things--Excellent Lessons When you are new to software engineering, these principles and design patterns are not easy to understand or get used to.We all have problems, it is difficult to understand SOLID + DP i ...

Posted on Thu, 12 Dec 2019 23:00:19 -0500 by TipPro

Implementing one-way one-to-many Association in JPA

scene Introduction to JPA and HelloWorld (with code download): https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103473937 Implement one-way many-to-one associations in JPA: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/103511623 Once the HelloWorld program for JPA is set up above, and one-way many-to-one associations are im ...

Posted on Thu, 12 Dec 2019 20:47:39 -0500 by Darkness Soul

Tear JVM garbage collection logs by hand

The following figure is the outline of this article. It will describe how to handle the JVM log from the following four aspects. Prepare to not panic To analyze logs, first you have to have a log, right.It's always right to be rainy.The so-called log means that you have to configure JVM parameters, log format, log storage location and other p ...

Posted on Thu, 12 Dec 2019 20:45:46 -0500 by Shad

Several asynchronous implementations of Android

Article directory Asynchronous implementation with Java methods 1. Inherit Thread class 2. Implement the Runnable interface Asynchronous using Android specific methods 1,AsyncTask 2,Handler 3,RxJava Asynchronous implementation with Java methods There are mainly two ways to implement asynchrony, inherit Thread class a ...

Posted on Thu, 12 Dec 2019 15:15:42 -0500 by james_creasy