micro source code analysis of microservice architecture middleware loading
An example of current limiting Middleware
func TestRateClientLimit(t *testing.T) {
b := ratelimit.NewBucketWithRate(float64(limit), int64(limit))
//...
c := client.NewClient(
// set the selector
client.Selector(s),
// add the breaker wrapper
client.Wrap(NewClientWrapper( ...
Posted by xstevey_bx on Sat, 02 Nov 2019 21:52:02 -0700
Flask custom time filter
About the Flask filter
The function of the filter provided by Flask is limited, and it can't meet the user's requirements in many cases.
Therefore, Flask provides the user with a template filter decorator, which is used to create user-defined filters
Time display
Regular users of blogs will notice that the general ...
Posted by westminster86 on Sat, 02 Nov 2019 06:05:03 -0700
Golang connection operation MySQL database
1. Install MySQL driver
Installation mode: open the command line and execute the go command:
go get -u github.com/go-sql-driver/mysql
2. Connect MySQL
To build a connection, the format is: "user name: password @ tcp(IP: port) / database? charset=utf8"
Open the database, the forme ...
Posted by sparc-e on Sat, 02 Nov 2019 05:38:08 -0700
How to implement paging operation in SMM framework
1. Import the PageHelper jar package, add the following dependencies to pom.xml under the parent project, and refresh it with Maven on the right (in idea)
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId ...
Posted by dawieharmse on Sat, 02 Nov 2019 03:36:19 -0700
Microservice architecture case (03): introduction to database selection, business data planning and design
Source code: GitHub point here || GitEE point here
Update progress (6 sections in total):
01: brief introduction of project technology selection and schematic description of structure
02: business architecture design, system hierarchical management
03: database selection, business data design and planning
I. database selection
1. Database ...
Posted by nerotic on Sat, 02 Nov 2019 00:47:00 -0700
Excel boot (a lightweight open source component composed of Excel import and export solution)
Easy-POI
Tool link
Github: https://github.com/programmeres/easy-poi
Code cloud: https://gitee.com/nw1992/easy-poi
Easy POI is a lightweight open source component of Excel import and export solution.
(if you like or are willing to use it, please star and Watch the project. If you are an enterprise, please let me know the name of the enterprise b ...
Posted by LazyJones on Sat, 02 Nov 2019 00:18:01 -0700
java wechat payment [unified order interface] and [order query interface] Call successful complete code and results
The company wants to do wechat payment recently, but it hasn't done it before, but it's not difficult to do it with Alibaba cloud. I found a lot of posts on the Internet, and did five test projects in eclipse, but they didn't succeed in the test. Later, I got off the wechat SDK, and also made a test sample. During the t ...
Posted by J-C on Fri, 01 Nov 2019 22:48:25 -0700
JQuery svg pan zoom for svg drag and zoom
jquery-svg-pan-zoom.js download and documentation here https://github.com/DanielHoffmann/jquery-svg-pan-zoom
Principle: control the viewbox property of svg
viewbox is an attribute of SVG image. It defines the visible area of SVG, which is defined by four numbers: abscissa X, ordinate Y, Width, ...
Posted by ganlal on Fri, 01 Nov 2019 21:58:25 -0700
The implementation of golang / creator js uses protobuf for data interaction
protobuf is a general rule of data serialization, which is faster and smaller than xml and json.
This time, proto 3 is used. 3 has some features different from 2. For example, 3 defaults to the optional declaration.
All fields are optional assignments, so as to be compatible with the fact that s ...
Posted by BrentNorin on Fri, 01 Nov 2019 20:09:04 -0700
Springbootmybatis02 mybatis generator GUI | PageHelper | front and back end separation
I. mybatis generator GUI
Download address: https://github.com/LittlePageProgram/mybatis-generator-gui.git
Usage: fill in related items and click generate
Note:
1. For EntityExample, you need to drag it into the mapper layer
2. For modifying XML configuration information, the corresponding example also needs to be adjusted to the mapper lay ...
Posted by thepip3r on Fri, 01 Nov 2019 19:19:27 -0700