springboot 2.1.7 + mysql5.6 Discard Calendar type field

Reason: When using Calendar as the field type, each findById() operation returns a slightly larger value than the actual value.The query will be invoked after the update and will be larger.That is, if we use Calendar as the field type, the field will quietly grow when the program runs. Code preparation The sample code is simple: we only need to ...

Posted on Sat, 17 Aug 2019 19:18:39 -0700 by mie

Validation introduced by SpringMVC

Data validation on the client side is not safe and effective for any application, which requires us to validate the validity of data on the server side when developing.SpringMVC has its own good support for data validation on the server side. It can validate the validity of data we submit to the server side according to our prior conventions. F ...

Posted on Wed, 14 Aug 2019 23:53:57 -0700 by PHPGuru_2700

Spring Data JPA Relational Mapping @OneToOne

@ OneToOne represents a one-to-one mapping relationship, such as an account corresponding to a user, an entity used to describe the information of the account (account number, password, whether the account is available, the role corresponding to the account, etc.), and another entity used to describe the information of the user (nickname, age, ...

Posted on Thu, 01 Aug 2019 00:12:59 -0700 by Darhazer

Spring method level data validation: @Validated

Every sentence In Deep Work, the author puts forward a formula: high quality output = time * concentration. So high quality output does not depend on time, but on efficiency. Relevant Reading [Xiaojia Java] Deep understanding of data validation: Java Bean Validation 2.0 (JSR303, JSR349, JSR380) Hibernate-Validation 6.x use caseKnow more about ...

Posted on Fri, 26 Jul 2019 23:20:30 -0700 by EricC

One of the most complete spring annotations in history

Links to the original text: http://www.cnblogs.com/yansjhere/p/11005460.html Annotation is a good thing, but good things we have seen, sorted out, understood, used before we know good. Do not ask each of us to remember, but to keep an i ...

Posted on Sat, 20 Jul 2019 21:19:52 -0700 by phigga

Configuration and simple use of Hibernate

1. Concepts Hibernate is an open source Object Relational Mapping (ORM) framework that encapsulates JDBC in a very lightweight object package, allowing Java programmers to ditch writing SQL statements in their programs and manipulate databases with their own object programming thinking. 2. Preparations Install the HibernateTools plug-in in Ecl ...

Posted on Sat, 13 Jul 2019 10:24:18 -0700 by acemods

Building ssh framework for user login registration

Building ssh framework for user login registrationThe first step is to import the jar package Step 2 Setting up a struts2 environment(1) Create action (inherit actionnsuport), create struts.xml configuration file, configure actionpublic class UserAction extends ActionSupport{}<?xml version="1.0" encoding="U ...

Posted on Sat, 29 Jun 2019 19:23:54 -0700 by and1c

Initial knowledge of multithreading (second)

One: Some methods in threads 1.1 Thread Add public final void join() Waiting for the thread to abort, other threads can continue to rush to execute Because each thread preempts the execution power of the CPU when the thread executes, we can use this method to let one thread execute first, and then to execute other threads. public clas ...

Posted on Wed, 26 Jun 2019 16:53:33 -0700 by tcollie

Hibernate uses annotations for ORM mapping instances

In the previous blog, we mapped entity classes and tables through xml configuration files, but in the past two years, more projects have used annotations to map some stable entity classes to ORM, which makes programming more concise and simple. In fact, there are not too many changes in the process of ORM mapping using annotations and xml mappi ...

Posted on Sat, 15 Jun 2019 16:23:12 -0700 by cscheuble

A Summary of the Learning of "Hibernate's Initial Exploration of Many-to-Many Mapping"

Time: Tuesday, 11 July 2017Note: Part of the content of this article is from Mucho.com. @ Mu Course Net: http://www.imooc.comTeaching Source: NoneLearning source code: https://github.com/zccodere/s... Chapter 1: Application scenarios 1-1 multi-to-many application scenarios Case analysis: enterprise project development process A project can be d ...

Posted on Thu, 13 Jun 2019 18:25:58 -0700 by dcalladi