hibernate Framework-Association Mapping (hibernate Mapping)

Set Mapping Development process: requirements analysis/database design, project design/coding/testing/implementation deployment online/acceptance Requirements: User purchase, fill in the address! Database Design: Not available yet Code javabean designpublic class User { private int userId; private String userName; // One us ...

Posted by TravisJRyan on Thu, 11 Jul 2019 09:32:51 -0700

Requs Library - Web Crawler

Introduction to requests Library Official documents: requests quick start It is written in great detail and recommended to read the official documents. Get started quickly Import requests Library import requests Send request: r = requests.get('url') r = requests.post("http://httpbin.org/post") r = requests.put("http://httpbin.org/ ...

Posted by keiron77 on Wed, 10 Jul 2019 09:39:28 -0700

Store Session of Nginx+Tomcat Load Balancing Cluster with Redis

Environment: Cent OS 7.0 (Virtual Machine Environment), Nginx 1.9.8, Redis 3.2.1 1. Background When using Nginx+Tomcat for load balancing, because Nginx distributes different requests to a Tomcat, Tomcat runs in different containers, because session s are out of sync or lost. 2. Installation and Configuration of Nginx 1. Nginx I ...

Posted by TalonFinsky on Tue, 09 Jul 2019 10:52:53 -0700

Three realms of PHP decoupling (service container)

First realm Suppose the scenario: We need to write a processing class that can operate on sessions, databases, and file systems at the same time.We might write that. Realm characteristics: can run, but severely coupled <?php /** * First */ namespace test1; class DB{ public function __construct($arg1,$arg2){ echo 'constru ...

Posted by The_broken on Tue, 09 Jul 2019 10:48:20 -0700

iOS-Complete Construction of Live Broadcasting Steps and Specific Implementation

Preface Good memory is not as good as bad writing. Recently, I have had some time to sort out some knowledge, and then I will write some summaries one after another. Start with this less familiar audio and video section. 2016 is the first year of live broadcasting. This technology is no stranger. Later, I realized that I started to learn recent ...

Posted by wardo on Mon, 08 Jul 2019 16:17:36 -0700

Struts 2 Learning Notes (Day 3)

1. Tasks for Today · OGNL expression · Combination of OGNL and Struts 2 · Use Struts 2 to optimize customer queries 2. Relevant knowledge 2.1 OGNL Overview of 2.1.1 OGNL OGNL expression OGNL, known as Object-Graph Navigation Language, is a powerful expression language for acquiring and setting attributes of Java ...

Posted by Ionisis on Mon, 08 Jul 2019 14:14:44 -0700

MySQL InnoDB default isolation level magic reading problem

Isolation level of MySQL InnoDB transactions There are four levels, and the default is REPEATABLE READ. Uncommitted Read (READ) UNCOMMITTED).Another transaction modifies the data but has not committed it yet, and SELECT in this transaction will read the uncommitted data (dirty read). Committed Read (READ) COMMITTED).This transaction re ...

Posted by ywickham on Mon, 08 Jul 2019 13:24:33 -0700

Implementation of Distributed Lock Based on Constul

When we build distributed systems, we often need to control mutually exclusive access to shared resources. At this time, we are involved in the implementation of distributed locks (also known as global locks). Based on the current tools, we have a large number of ways of implementation, such as: Redis-based implementation, Zookeeper-based imple ...

Posted by amitshah on Mon, 08 Jul 2019 13:21:16 -0700

Combining Spring with Websocket to Push Messages

There are three main steps in this paper. 1. Build a websocket connection after the user logs in, and choose the websocket connection by default. If the browser does not support it, use sockjs to simulate the connection. 2. After establishing the connection, the server returns the unread message of the user. 3. After relevant operation, the s ...

Posted by funkyres on Sun, 07 Jul 2019 11:14:51 -0700

Addition, deletion and modification of mybatis

Welcome to join 214821336!!! Statement: With mybatis, you don't need to write the implementation class of dao. In order to maintain the integrity of the three-tier architecture, you add the implementation class of interface dao. 1. Increase sql statement --> has default return type, usually int.    <!-- New Classes --> <ins ...

Posted by foreverhex on Sat, 06 Jul 2019 13:51:33 -0700