1. Add dependencies and configuration <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> Add the following configuration in application.yaml: spring: redis: # address host: localhost # port, default is 6379 port: 6379 # password password: # Connection timeout timeout: 10s lettuce: pool: # The minimum idle connection in the connection pool min-idle: 0 # The maximum idle connection in […]
Tag: redis
Example explanation of redis using pipeline mode to write performance tuning under Java Springboot
Instance of redis write pipeline mode performance tuning under Springboot 1. Real scene In the process of producing real projects, it is necessary to write the data of the database to redis synchronously, and encounter the bottleneck of writing to redis during this process. Every time the project is started, the database data must be […]
Redis persistence and cluster
Redis can realize the persistence function by saving data in the disk to prevent a large amount of data loss caused by downtime. But persistence can only guarantee that the data can be saved for a long time when the disk is not damaged. If the disk is damaged, the data is still will be […]
springboot integrates redis under windows
Installation tutorial: How to install Redis under Widows? 1. Start the redis service first 2. Import prm.xml <dependencies> <!–redis dependency–> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <version>2.7.0</version> </dependency> </dependencies> 3. Configure yml spring: #Configure reids redis: host: 127.0.0.1 #Local IP address port: 6379 #reids service port number 4, reids configuration class ** * redis configuration class */ @Configuration […]
Spring Boot Series: Integrating Redis Database Distributed Tools Redisson Cache Spring Cache
Integrated Redis database distributed tool Redisson cache Spring Cache Redis client Jedis Jedis is a lightweight Redis client implemented in Java, with a simple and Socket-based operation mode and high performance. Jedis API provides comprehensive support for Redis commands. Using blocked I/O operations, method calls are all synchronous, and the program flow cannot be executed […]
Springboot+mybatis+redis roughly 3 steps
1. Create a new spring project and check the necessary component web DataJdbc mysql redis 2. Download redis, configure config file Comment bind 127, allow all ip access Protected-mode yes change to no to cancel the protection mechanism and allow external network access daemonize no change yes background operation Uncomment requirepass to set the password […]
springboot integrates redisson to realize distributed locks, and realizes the function of deduction of commodity orders and inventory
1. Usage scenarios Some scenarios in distributed services (such as scheduled tasks and inventory updates) need to consider the possible problems caused by concurrent execution. If you do not use professional distributed timing tools (such as quartz), but simply rely on timers to do timing tasks, then there will be concurrent execution, which may cause […]
Go handwritten Redis (8) database core layer and instruction implementation
Database core layer The logic of the processor has been implemented before, and now the core data layer has been implemented. The core database is mainly used to execute instructions sent by users and store data 1. Database The top-level interface definition of the data layer is defined in the interface/database/database.go file, It defines the […]
Operate Redis in SpringBoot to parse JsonArray data into object List (ruoyi dictionary value sys_dict as an example)
Scene If you follow the front-end and back-end separation version to teach you how to build the environment locally and run the project: Ruoyi separates the front and back ends to teach you how to build the environment locally and run the project_How to run the project with the front and back ends separated_Overbearing rogue […]
Bitmap/hyperloglog/GEO of Redis
bitmap/hyperlog/GEO of Redis Introduction of interview questions Two types of statistics three hyperloglog 3.1 Industry Terminology 3.2 hyperloglog basis 3.2.1 Base 3.2.2 Definition 3.2.3 Cardinality statistics 3.2.4 Basic commands 3.3 Principle of HyperLogLog 3.3.1 Ways to deduplicate statistics 3.3.2 Principle 3.4 HyperLogLog case study 3.4.1 Requirements 3.4.2 Scheme Discussion 3.4.3 HyperLogLogService Four geos 4.1 Introduction […]