java server development servlet: 3. Servlet using jdbc to access database: add employee information to mysql database

Catalog I. Preface 2, Add employee information and insert it into mysql database 1. HTML form submission Code: addEmp.html 2. Profile code: web.xml 3. Java code: AddEmpServlet.java 4. Building database and table (1) Log in to mysql (2) View which databases currently exist (3) Create a new da ...

Posted on Sun, 15 Mar 2020 19:06:09 -0700 by dahwan

Mybatis cache configuration

Preface Using cache can improve the speed of data acquisition and avoid frequent database interaction, especially in the case of more queries and higher cache hit rate, the role of using cache is more obvious. Generally speaking, when Mybatis cache is mentioned, it refers to the second level cache, which is enabled by default. First level ca ...

Posted on Sat, 14 Mar 2020 04:57:06 -0700 by z1haze

Jdk dynamic agent source code

Preface There are two kinds of java Dynamic agents: Jdk dynamic agent and cglib dynamic agent. This paper mainly introduces the use, operation mechanism and source code analysis of Jdk dynamic agent. When spring does not manually turn on cglib dynamic proxy, that is: < AOP: AspectJ AutoProxy proxy ...

Posted on Sat, 14 Mar 2020 00:27:03 -0700 by nightowl

Some mistakes of Java basic knowledge

1, Use equals() correctly Object's equals method is easy to throw null pointer exceptions. You should call equals with a constant or an object with a value. String str = null; if (str.equals("abcd")) { ... } else { ... } If the variable str is null, a null pointer exception will be thrown. If there is no catch to catch and handle (we gene ...

Posted on Sat, 14 Mar 2020 00:11:09 -0700 by iffo

Java single application - Architecture Mode - 03. Design mode - 22. Empty object mode

Original address: http://www.work100.net/training/monolithic-architecture-design-patterns-null-object-pattern.htmlMore tutorials: Beam cloud - free course Empty object mode Serial number Chapter in text video 1 Summary - 2 Realization - Please refer to the navigation above for reading 1. overview In Null Object Pattern, an empty obje ...

Posted on Fri, 13 Mar 2020 07:50:04 -0700 by khf79

MySQL Database Management Foundation for Linux Operations and Maintenance

What is SQL: SQL is the standard computer language for accessing and processing databases.SQL (Structured Query Language is Structured Query Language)Role of the database: Used to store all user information, all service programs need a database, stored accounts, passwords, usage records, deposit balance ...

Posted on Thu, 12 Mar 2020 18:51:30 -0700 by rjs

MYSQL database index

Index overview In MySQL, an index is composed of one or more columns in a data table. The purpose of creating an index is to optimize the query speed of the database. Where, the index created by the user points to the specific data location in the database. When users query the data in the database by index, they do not need to traverse all t ...

Posted on Thu, 12 Mar 2020 02:08:04 -0700 by phpcodec

Delayed loading of mybatis

In Mybatis, the configuration and implementation of one-to-one, one to many, many to many relationships can realize the associated query of objects. In the actual development process, we don't always need to load the user's account information when loading the user information. This is what we call del ...

Posted on Wed, 11 Mar 2020 03:02:34 -0700 by peterj

Architect's internal mental skill, a detailed explanation of bridging mode connecting two spatial dimensions

In real life, the bridge mode can also be seen everywhere, such as connecting two spatial dimensions of the bridge, connecting the virtual network and the real network. Bridge Pattern is also called Bridge Pattern, interface pattern or Handle And Body pattern. It separates the abstract part from its concrete implementation part so that they ca ...

Posted on Wed, 11 Mar 2020 02:29:07 -0700 by belayet

Analysis of changing MySQL database storage directory on CentOS 7

I have summarized two articles before“ MySQL changes database data storage directory "And" Change MySQL database data store directory on Ubuntu ”, is a simple summary of relevant cases in the work. At the beginning, the experience was insufficient and the cognition was limited, so now it seems that the original blog really ...

Posted on Tue, 10 Mar 2020 20:11:15 -0700 by jburbage