Go Language (18) context & Log Items

Context&log items context Method to cancel goroutine in general scenarios var wg sync.WaitGroup var exit bool func worker(exitChan chan struct{}) { LOOP: for { fmt.Printf("work\n") time.Sleep(time.Second) /*if exit { break } */ select { case <- exitChan: break LOOP ...

Posted by loopykd on Mon, 04 May 2020 16:40:51 -0700

ssm upload image file to ftp (image compression processing)

ssm upload image file to ftp (image compression processing) Development tool Eclipse 1. Introduce jar package Download address of jar package: Ali central warehouse 2. Configure spring-mvc.xml and add the following code <bean id="multipartResolver" class="org.springframework.web.multipart.common ...

Posted by asy1mpo on Mon, 04 May 2020 04:28:17 -0700

Java WEB -- file upload

The recently learned file upload in the web phase, I just want to record it, help myself review and help you learn. Generally, I will save the uploaded file under the web inf in the server, because the user will not directly access it, and the path we save to the database is generally the path. There is no demonstration of database upload path. ...

Posted by notionlogic on Mon, 04 May 2020 03:50:44 -0700

A tutorial of using JAX-RS client WebClient

JAX-RS client programming – > There are two ways: ① Using the http client tool, we need to customize and parse the HTTP protocol ② This article focuses on the use of WebClient tool class (Brought by CXF) to explain RS client programming. Using RS WebClient requires importing coordinates in pom.xml file & ...

Posted by vineld on Sun, 03 May 2020 21:16:32 -0700

File upload learning record used in Java Web project (1)

File upload learning record used in Java Web project (1) Introduction: File upload is a commonly used function in development. I will mainly introduce the implementation of basic file upload function with commons-fileupload-1.2.1.jar package, that is, file upload to the specified directory, and introduce the relevant classes and methods use ...

Posted by hypuk on Sun, 03 May 2020 02:26:04 -0700

36. Spring boot configures Cors to solve cross domain requests

CORS (cross origin resource sharing) "cross domain resource sharing" is a W3C standard. It allows browsers to send Ajax requests to cross domain servers, breaking the resource limit that Ajax can only access the site. CORS is used in many places. JS payment of wechat payment is to send cross domain requests to wechat servers through ...

Posted by insane on Sat, 02 May 2020 19:32:13 -0700

The case of network programming based on HttpClient Download Text and picture download text and picture for Android

The case of downloading text and picture network programming based on HttpClient for Android 1, Operation effect 2, Implementation steps 1. Create android app DownloadTextImageByHttpClient 2, Main layout file activity main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://s ...

Posted by prasitc2005 on Sat, 02 May 2020 19:28:17 -0700

Eight of three phases of Linux: Architecture nginx practical application

8, Architecture nginx practical application (1) Introduction of web service software There are three kinds of software commonly used to provide static Web services: 1 Apache: This is the mainstream of small and medium-sized Web services, the big brother of web servers. 2 Nginx: The mainstream of Web services for large-scale websites, onc ...

Posted by cdinca on Sat, 02 May 2020 14:52:31 -0700

The installation and use of nginx under Windows

The original application ran with a single node, and the user always complained that the service response was very slow. In order to improve the user experience, we thought of trying to alleviate the multi-node load balancing Because of the pressure of the server, we found the window version of nginx. According to the introduction of the para ...

Posted by onlinegamesnz on Sat, 02 May 2020 07:18:40 -0700

SPARQL basic mode query

The last one is a brief introduction to SPARQL. This article introduces the basic schema query of SPARQL Still use the example from the previous article: <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:vCard='http://www.w3.org/2001/vcard-rdf/3.0#' > <rdf:Description rdf:about="http://somew ...

Posted by Levan on Fri, 01 May 2020 22:27:02 -0700