Redis's low-cost, high availability design has taken nearly a year to sort out the list of Java core knowledge

This paper mainly introduces the design of redis high availability scheme using official sentinel. Redis Sentinel Sentinel introduction Sentinel is a highly available solution officially provided by redis for clusters. In actual projects, sentinel can be used for automatic redis failover to reduce the workload of manual intervention. In a ...

Posted by psychowolvesbane on Mon, 06 Sep 2021 03:23:37 +0200

The simple test of celery and the data type of redis when using redis as the broker

1. First two files <1> Tasks (general name fixed) tasks.py from celery import Celery import time # app = Celery('tasks') app = Celery('celery_name', backend='redis://127.0.0.1:6379/3', broker='redis://127.0.0.1:6379 / 2 ') # configure the backend and broker of the celery # app.config_from_object('tasks') #Co ...

Posted by Robin M on Sat, 04 Sep 2021 19:14:29 +0200

Berserker says Mybatis notes

Crazy God said MyBatis01: the first program Introduction to MyBatis Environmental description: jdk 8 +MySQL 5.7.19maven-3.6.1IDEA Before learning, you need to master: JDBCMySQL Java Foundation MavenJunit What is MyBatis MyBatis is an excellent persistence layer frameworkMyBatis avoids almost all JDBC code and the proce ...

Posted by jeephp on Thu, 02 Sep 2021 20:47:51 +0200

Hiberante reverse-generates database tables

1,hibernate.cfg.xml Comment out this section of configuration <!--Update database level automatically--> <!--<property name="hbm2ddl.auto">create</property>--> 2. New Generate Database Table Tool Class public class HibernateSchemaExport { static Session session; static Configuration ...

Posted by rashu.dr on Sat, 18 Jul 2020 17:47:25 +0200

Picture deletion for laravel-admin

There is a deep doubt about laravel-admin's picture upload mechanism. Deleting avatar pictures on the user information page will cause an error. It was 1.4 at that time, and later updated 1.5 found that the delete button disappeared directly. If you use image normally in the form during the process of use, the slight ...

Posted by Lustre on Sat, 18 Jul 2020 16:38:30 +0200

ajax and servlet -- Verify that the user name exists

Verify that the user name exists -- using jQuery 1. Database mysql The user name already exists in the database. 2. html Page <body> <h1>User Login</h1> <hr> <form name="regForm" action="dologin.jsp" method="post"> <table> <tr> <td>user ...

Posted by splitinfo on Fri, 17 Jul 2020 16:26:13 +0200

phpmyadmin connects databases on multiple servers at the same time

1. Scenarios for use In general, there are test environments and formal environments for our development.Of course, databases are also separate.If you could use phpmyadmin to directly access mysql on both servers.This is the need. 2. Solutions 1. Find under the phpmyadmin folderConfig.sample.inc.php, renamedConfig.inc.php. 2. OpenConfig. ...

Posted by DanArosa on Wed, 15 Jul 2020 17:45:45 +0200

Mybatis (2) Parameters transfer

Mybatis parameter (Parameters) pass 1.. Single parameter Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.   <!-- according to id Query a record in a data table and encapsulate it User object --> <select id="selectById" resultType="com.s ...

Posted by aidema on Tue, 14 Jul 2020 17:19:14 +0200

Mybatis (2) Parameters transfer

Mybatis parameter (Parameters) pass 1.. Single parameter Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.   <!-- according to id Query a record in a data table and encapsulate it User object --> <select id="selectById" resultType="com.s ...

Posted by Errant_Shadow on Tue, 14 Jul 2020 17:19:34 +0200

Use ContentObserver to listen for text messages to receive onChange method calls twice

I used to use BroadcastReceiver to listen for text messages, but I later learned that ContentObserver can also do this, and it's more convenient.So try this. ContentObserver works by observing (capturing) changes in the database caused by a particular Uri and then doing some appropriate work. During the process of listening for text messages ...

Posted by samvelyano on Sun, 12 Jul 2020 18:29:20 +0200