MyBatis - loading mechanism for global configuration files

For code debugging, we can use any test code in the previous chapter as the Debug carrier. In this chapter, we actually study these two codes: InputStream xml = Resources.getResourceAsStream("mybatis-config.xml"); SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(xml); That is, how to load the MyBatis global ...

Posted by BETA on Sat, 20 Nov 2021 15:46:12 -0800

Example of PHP operating Redis queue

IDS is an advanced open source key value storage system, which is implemented in ANSI C. It is similar to memcached, but supports persistent data storage Queue operation: <?php $redis = new Redis(); $redis->connect('127.0.0.1',6379); while(True){ try{ $value = 'value_'.date('Y-m-d H:i:s'); $redis->LPUSH('key1',$value); sleep(r ...

Posted by dazzathedrummer on Sat, 20 Nov 2021 01:40:39 -0800

Redis source code learning - 1.8 - ordered collection

Source location: intset.h and intset.c 8.1 data structure /* Note that these encodings are ordered, so: * INTSET_ENC_INT16 < INTSET_ENC_INT32 < INTSET_ENC_INT64. */ #define INTSET_ENC_INT16 (sizeof(int16_t)) #define INTSET_ENC_INT32 (sizeof(int32_t)) #define INTSET_ENC_INT64 (sizeof(int64_t)) // All the following data are stored in ...

Posted by remmargorp on Fri, 19 Nov 2021 17:58:03 -0800

MyBatis - mapper mapping file details

0. Project construction As usual, let's build a new project first   configuration   The project is a little messy. The name of the project is what we call it   mybatis-03-mapper   Well, the imported dependencies are the same as before, and then simplify the previous code. The copied project structure and documents shall be ...

Posted by s1yman on Fri, 19 Nov 2021 16:53:02 -0800

[redis] redis quick start (Intensive)

1, Basic command 1. Switch database (select) redis has 16 databases by default, and the 0 database is used by default Command for switching data: select number localhost:6379> select 2 OK # Switching succeeded localhost:6379[2]> # 6379 [2] represents the third database 2. set and get methods Command 1: set ...

Posted by Tomz on Fri, 19 Nov 2021 13:18:23 -0800

Advanced MySQL - character set and comparison rules

Introduction to character sets and comparison rules Character set introduction We know that only binary data can be stored in the computer, so how to store strings? Of course, it is necessary to establish the mapping relationship between characters and binary data. To establish this relationship, at least two things should be clear: What ch ...

Posted by adnanhb on Fri, 19 Nov 2021 05:46:22 -0800

Redis application learning notes

From my point of view, this article is a little rough. After all, it doesn't take much time. As an entry point, it may not enter the door? Redis is a very powerful database. I once read his source code and marveled at the monotony of his bottom layer, but the variability of his top layer. This is in response to the sentence "Tao gener ...

Posted by BVis on Wed, 17 Nov 2021 05:47:22 -0800

Use of Spring Data Redis Stream

1, Background The Stream type is a new type after redis5. In this article, we use Spring boot data redis to consume the data in Redis Stream. Realize independent consumption and consumption group consumption. 2, Integration steps 1. Import jar package <dependencies> <dependency> <groupid>org.springframework.boot</ ...

Posted by David Wood on Fri, 12 Nov 2021 05:24:57 -0800

[Special Topic on Redis source code analysis] from the essence analysis, why is the data you wrote in Redis missing?

Introduction to Redis database As a mature data storage middleware, Redis provides perfect data management functions, such as data expiration mentioned earlier and the data evict strategy we want to talk about today. Data locality principle The principle of locality, which runs through computer science, can clearly tell you that there are ...

Posted by pixelgirl on Fri, 12 Nov 2021 03:20:48 -0800

Use of Spring Data Redis Stream

1, BackgroundThe Stream type is a new type after redis5. In this article, we use Spring boot data redis to consume the data in Redis Stream. Realize independent consumption and consumption group consumption.2, Integration steps1. Import jar package<dependencies> <dependency> <groupId>org.springframework.boot</groupId& ...

Posted by awiedman on Thu, 11 Nov 2021 11:07:58 -0800