Several Implementations of Uploading Files to go-fastdfs by Obtaining File Input Stream in Spring MVC/SpringBook Controller
This is a reprinted article, the reason for reprinting is that the original author missed an import of hutool, resulting in a waste of 5 hours, and the original author's article can not comment, hereby reprint + explanation.
It's this line of code that pitted me for five hours:import cn.hutool.core.io.resource.InputStreamResource;
Recently, man ...
Posted by Loafin on Thu, 22 Aug 2019 08:09:54 -0700
Guide to full use of mica-http [1]
mica-http
mica-http is an encapsulation of okhttp, an HTTP toolkit for Fluent syntax, and a syntax reference to the HttpClient Fluent API.
Use
maven
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-http</artifactId>
<version>${version}</version>
</dependency>
gradle
compile("net. ...
Posted by BVis on Tue, 30 Jul 2019 10:00:53 -0700
How to use Retrofit (KAD21) with Kotlin on Android
Authors: Antonio Leiva
Time: Apr 18, 2017
Link to the original text: https://antonioleiva.com/retrofit-android-kotlin/
This is another example of how to use the same library Java used in Kotlin.
Retrofit is a library that greatly simplifies the request API. In this example, I plan to teach you how to integrate it with some LastFM API r ...
Posted by Fusioned on Sat, 06 Jul 2019 15:57:47 -0700
Android uses network technology
Android uses network technology
Android uses network technology
Using WebView
Accessing the network using the Http protocol
1 Use HttpURLConnection
2 Use OkHttp
Parsing xml format
Parse JSON format
1 Use JSONObject
2 Use GSON
1. Use WebView
Sometimes we encounter special requirements, such as requiring some web pages to be ...
Posted by zavin on Fri, 05 Jul 2019 10:07:39 -0700
OKHttp Source Code Analysis (2) RequestBody
1. Overview
In the previous blog, the surface source code of the OKHttp framework was analyzed using the get request as an example, see: OKHttp Source Code Analysis (1)
Most of the API s used in post requests are the same as those used in get requests. The biggest difference is the post method of the Request.Builder class, which sets the bod ...
Posted by Pjack125 on Thu, 04 Jul 2019 13:32:24 -0700
[Android Component Interpretation] Leak Canary Explanation
Preface
Leak Canary is a small tool for Android memory detection provided by Square. It can help us locate code hidden BUG quickly and reduce the chance of OOM.
Here is the git address link: https://github.com/square/leakcanary
Side Topic: Square is really a conscientious company, providing many well-known components. Subsequently, the well-kno ...
Posted by scnov on Wed, 03 Jul 2019 16:00:18 -0700
Retrofit+RxJava 2.x Easily Implements the Network Layer of app
Foreword: I am also a novice, writing this article is intended to throw a brick to attract jade, I hope some gods can come to see where I have shortcomings, help me answer questions and solve difficulties! If you have just contacted a small partner, you can also make progress together...
First of all, before reading this blog, you need to maste ...
Posted by NightCoder on Mon, 01 Jul 2019 16:15:28 -0700
Use Retrofit and Okhttp to implement network caching. No net-read cache, net-reads re-request according to expiration time
Using Retrofit and Okhttp to implement network caching, updated in 2016.02.02
This article uses Retrofit 2.0.0-beta 2 and Okhttp 2.6.0 (the api writing changed after Okhttp 3.0)
Cache for configuring Okhttp
Configure the cache-control in the request header or unify the request headers for all requests
Cloud cooperates with setting respo ...
Posted by BinaryDragon on Fri, 28 Jun 2019 14:33:20 -0700
Android Project Confusion Series 2
When the project goes online, it often encounters confusion. The previous article has outlined some common pits, as well as the areas needing confusion. This article is a supplement to the previous article, but also some pits encountered recently.
First of all, I would like to talk about the pit I encountered this time, which is the circular ...
Posted by sixdollarshirt on Thu, 27 Jun 2019 17:23:10 -0700
Android Network Technology
I. Use of WebView
When we need to browse the web page in the application, but can not open the system browser, we can use the WebView control brought by Android to achieve this requirement.
Create a new WebViewTest project and modify the activity_main.xml code.
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/andro ...
Posted by gmann001 on Mon, 24 Jun 2019 11:05:17 -0700