Spock in Java is slowly falling in love with writing unit tests

Preface Recently, the team introduced Spock testing framework. After I used it in practice, I had a very good experience. At the same time, I learned the relevant knowledge of unit testing in the whole learning process. The purpose of this article is to consolidate the input knowledge and to promote it to all of you. Before we learn about the ...

Posted by dethron on Tue, 08 Oct 2019 19:56:41 +0200

JWeb Velocity Template Rendering

I've learned one template rendering technology before, Thymleaf. Today I'm going to talk about another template rendering technology, Velocity! Knowledge Point Preview: Encapsulating various properties of Velocity with Properties Velocity Engine instantiates template engine objects based on Prope ...

Posted by varasurf on Tue, 01 Oct 2019 07:59:02 +0200

Conquer Redis + Jedis + Spring - List Operation

Links to the original text: https://my.oschina.net/mohaiyong/blog/221261 At first, I thought that operating hash tables and lists under Spring was so dirty. In a trance, I found tha ...

Posted by Qense on Mon, 09 Sep 2019 07:50:49 +0200

User Authentication and Authorization of Micro Services

[TOC] Stateful VS Stateless Almost all applications need to be authenticated and authorized. For example, user login with account password is an authentication process. After successful login, the system will allow users to access related resources under their account, which is called authorization.The complication is that users have the conc ...

Posted by eyekkon on Thu, 05 Sep 2019 19:12:12 +0200

IO Flow in JAVA System

1. Use of File Class java.io.File class: abstract representation of file and file directory paths, platform independent File can create, delete, and rename files and directories, but File cannot access the file content itself. If you ...

Posted by Sooz719 on Wed, 28 Aug 2019 04:04:01 +0200

java Learning Notes (Intermediate) - JDK Dynamic Agent

I. What is the Agency Model I believe you all know the concept of agent. In business, agents are everywhere. Assuming you are going to buy something, you can not go to the real manufacturer to buy, nor can you directly demand from the manufacturer, the agent is a bridge between the buyer and the manufacturer. If you want to buy or customize wha ...

Posted by newb on Thu, 15 Aug 2019 15:01:50 +0200

Reptilian-jsoup parsing

Jsoup After we grab the page, we need to parse it. String processing tools can be used to parse pages, or regular expressions can be used, but these methods can bring a lot of development costs, so we need to use a special technology to parse html pages. 1.1. Introduction to jsoup jsoup is a Java HTML parser that can directly parse a URL add ...

Posted by JonnyThunder on Wed, 07 Aug 2019 08:50:14 +0200

Hand-in-hand teaching you to access Flutter in Android projects and use Android layouts in Flutter

Start In flutter development, there are always two unavoidable problems: The migration of native projects to flutter requires access to flutter in native projects In order to use some mature applications in flutter project, it is unavoidable to use various mature libraries, such as audio and video. ...

Posted by zzz on Tue, 30 Jul 2019 18:05:34 +0200

Look, i++ is really not safe

Last article mentioned that "i++;" itself is a thread unsafe operation, because the operation is not atomic, there are two processes of value and assignment, but how can it be unsafe? This issue uses a "vmlens" project to demonstrate why thread insecurity occurs. At the end of the paper is a brief introduction to vmlens. Tes ...

Posted by loopt on Mon, 22 Jul 2019 10:53:17 +0200

Introducing and configuring MultiDex and improving build efficiency

MultiDex Recently, optimize upgrade project, finally reported the 64K method limit problem, and record the solution conveniently; Reasons for 64K limit The Android APK file is essentially a compressed file that contains the classes.dex file, an executable Dalvik byte code file that holds all the compiled Java code.The Dalvik executable sp ...

Posted by goldberg on Fri, 12 Jul 2019 20:02:07 +0200