Parameter Check - validator

Catalog background Importance Best Practice - springboot pom file Entity class (domain model) Controller layer Type comparison Reference articles background Background parameter validation is essential during development, so you often see code like the following There's nothing wrong with this ...

Posted on Sun, 13 Oct 2019 14:31:16 -0700 by neutra

java bean attribute verification framework valid

Project introduction Parameter verification is a very common requirement in java development. But there are still some problems in the use of hibernate-validator. Characteristic Support for fluent-validation Support jsr-303 annotation Support i18n Supporting user-defined policies Support user-defined annotations Open source address valid Crea ...

Posted on Sun, 13 Oct 2019 04:08:18 -0700 by Paul Moran

java deadlock demonstration

java deadlock demonstration java deadlock Simulated deadlock generation Deadlock is caused by multiple threads competing for the same resource package com.feshfans; /** * 1. This code demonstrates deadlock generation in java * 2. Deadlock checking method */ public class DeadlockShow { // Declare two resources private sta ...

Posted on Thu, 10 Oct 2019 09:14:53 -0700 by Alidad

Spring Boot Cache Actual Redis

Spring boot uses SimpleCacheConfiguration by default, even using Concurrent MapCache Manager to implement caching. But switching to other cache implementations is also simple. The following is the use of redis as a cache: pom file Introducing corresponding jar packages into pom <dependencies> <dependency> <groupId>org.sprin ...

Posted on Mon, 07 Oct 2019 08:41:03 -0700 by novice_php

Concurrent programming demo records demo22 ThreadLocal (Thread Local Variables) series

Horse Soldier High Concurrent Programming Series Records https://www.bilibili.com/video/av11076511/?spm_id_from=333.788.videocard.4 ThreadLocal1 ThreadLocal Thread Local Thread Local Variables import java.util.concurrent.TimeUnit; public class ThreadLocal1 { volatile static Person p = new Person(); ...

Posted on Tue, 01 Oct 2019 16:08:18 -0700 by ejwf

Learn extjs5 with me (40--Add a custom module [1 Create tables and bean files])

Original Link: https://my.oschina.net/zipu888/blog/549846 Learn extjs5 with me (40--Add a custom module [1 Create tables and bean files]) With the above work, CRUD of a separ ...

Posted on Fri, 13 Sep 2019 21:18:38 -0700 by brucec

CascadeType.PERSIST can not concatenate to save data source level exploration

Preface In business development, we often encounter the case that the primary key ID can not be self-increasing, but needs to use random strings. But in this case, CascadeType.PERSIST cascade storage is problematic. Here I assume that you know what ...

Posted on Wed, 11 Sep 2019 19:57:39 -0700 by nitram

Spring Data Jpa Initial Case and Query Detailed Analysis (in-depth good text)

 SpringDataJpaSpring Data JPA Let's get rid of the operation of DA0 layer, basically all CRUD s can rely on it to achieve. In practical work projects, Spring Data JPA+ORM (e.g. hibernate) is recommended to complete the operation, which provides great convenience in switching different ORM frameworks, but also makes the operation of database la ...

Posted on Sun, 08 Sep 2019 06:41:52 -0700 by Glyde

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