The prototype pattern of JAVA and pattern

The beginning of Dr. Yan Hong's Book JAVA and patterns describes the Prototype pattern as follows: The prototype pattern belongs to the creation pattern of the object. By giving a prototype object to indicate the type of all created objects, and then create more objects of the same type by copying the prototype object. This is the purpose of t ...

Posted by raw100 on Mon, 20 Dec 2021 17:16:28 +0100

Employee attendance system

Requirements: 1, User management 1. User list List fields: name, login name, gender, mobile phone number, salary, position and role List buttons: edit, enable, disable, reset password Search criteria: user name, status (enabled or disabled) Top button: Add User Import, export 2, Attendance management 1. Clock in Buttons: clock in at work (8:00 ...

Posted by phpology on Sat, 18 Dec 2021 17:59:48 +0100

MyBaits introduction and conclusion, senior Java development engineer of Netease

trim tag Intercept string Prefix = "": prefix. Add a prefix to the following sql statements as a whole prefixOverrides = "": take out possible extra characters in front of the whole string Suffix = "": add a suffix to the whole suffixOverrides = "": take out the characters that may be used after t ...

Posted by Jas on Wed, 15 Dec 2021 02:51:32 +0100

Initialization and implementation of HashMap capacity

HashMap initializes the collection using HashMap(int initialCapacity). By default, the capacity of HashMap is 16. However, if the user specifies a number as the capacity through the constructor, Hash will select a power greater than the first 2 of the number as the capacity. For example, if 3 is specified, the capacity is 4; If 7 is specified, ...

Posted by Fritz.fx on Tue, 14 Dec 2021 23:16:18 +0100

[Spring Boot] Spring Boot REST + Angular 2/4 + JPA + Hibernate + MySQL CRUD example

This page will introduce an example of CRUD using Spring Boot REST + Angular + JPA + Hibernate + MySQL. We will create a REST web service application using Spring Boot and a client application using angular. REST Web Services expose the methods of creating, reading, updating, and deleting operations. Angular applications will use angular's ...

Posted by Smifffy on Fri, 22 Oct 2021 06:41:39 +0200

Implementation of multithreading

Implementation of multithreading 1. Inherit Thread class     (1) define a class to inherit Thread and override the run() method;     (2) create subclass objects of Thread class;     (3) call start() to start a new thread. //The main thread and the custom thread execute concurrently public class th ...

Posted by lukegw on Sat, 09 Oct 2021 11:05:44 +0200

6, Java thread pool

6.1 why use thread pool? 6.2 how to use thread pool Tool class of thread pool: Arrays: tool class for arraysCollections: tool classes for collectionsExecutors: tool class of thread pool 6.2.1 architecture description of thread pool The thread pool in Java is implemented through the Executor framework, which uses Executor, Execut ...

Posted by gogul on Sat, 09 Oct 2021 07:31:52 +0200

Amazingly, how easy is Spring JdbcTemplate to write, delete, and check?

This article was intended to write about spring transactions, but JdbcTemplate-related functionality is used in most cases of transactions, so let's start with JdbcTemplate. What is JdbcTemplate? To review, the original way to operate db in java is pure jdbc. Whether every operation db needs to load database drivers, get connections, get Prep ...

Posted by buckboru on Thu, 23 Sep 2021 18:39:19 +0200

SpringBoot and data access (JPA and Mybatis)

part 1 ORM framework ORM (Object-Relational Mapping) The emergence of ORM framework is essentially to simplify the coding of database operations in the programming process. Now this ORM framework can be basically divided into two categories. First, the representative of fully automatic ORM framework is -- > hibernate claims that you don't n ...

Posted by BuzzPHP on Tue, 21 Sep 2021 06:38:50 +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