Introduction to Hibernate II (add, delete, modify and check)

Hibernate's addition, deletion, modification and query increase There are many ways to add, such as save, persist, savaoroupdate and merge. The use method is as follows. The code here follows the previous section package test; import java.util.Date; import org.hibernate.Session; import org.hibernate.SessionFactory ...

Posted by L0j1k on Thu, 02 Apr 2020 15:28:25 -0700

Percentage layout

In the commonly used layout LinearLayout, relativelayout and FrameLayout, only LinearLayout supports the function of using the layout "weight attribute to specify the size of the control in proportion, and neither of the other two layouts supports it. For this reason, Android has introduced a new layout method to solve this problem -- pe ...

Posted by satheshf12000 on Thu, 02 Apr 2020 15:18:00 -0700

Unit testing with JUnit in Intellij

These days, I'm groping for Intellij idea to record some small knowledge points. First contact with Intellij and use Hibernate framework to operate mysql database. If you want to use unit test in Intellij, you know that Junit is needed, but it is not found by default. How to solve it? >>First, go to settings an ...

Posted by devx on Tue, 31 Mar 2020 05:54:40 -0700

java implementation of Sudoku solution

Use exhaustive method to solve Sudoku problem. The general idea is: 1. First pick out the existing numbers and do not deal with them. 2. The enumeration of unknown numbers starts from top to bottom and from left to right. If the first number is [0] [0], first assume that it is 1, judge whether there are duplicates in ...

Posted by Bisdale on Mon, 30 Mar 2020 23:45:54 -0700

The thinking caused by the same or sequential characters in password verification. md

Thinking about password verification caused by the same or sequential characters [TOC] demand Although users hate this kind of complex password verification, sometimes for the sake of security, our system has to force users to set a higher strength password. For example: it is not allowed to have more than one character with the same or consecu ...

Posted by lalabored on Wed, 25 Mar 2020 09:05:54 -0700

Spring Cloud Micro Service Architecture From Getting Started to Getting Used - Service Gateway Authentication

In the previous article, we integrated a service gateway, Spring Cloud Gateway, where all service requests can be accessed through Gateway.We can then authenticate the user's request at the service gateway level to determine whether the routed API interface can be accessed. So let's start with more authentication, and here we're using jwt 1. Cr ...

Posted by Zero20two on Tue, 24 Mar 2020 10:07:39 -0700

CompletionService in Java Concurrent Programming

Recently, I met a requirement, one of which is time-consuming. In order to improve efficiency, I choose to start a new thread asynchronously. Due to the need to operate on the return value of the method, I choose to use FutureTask, which can get the task circularly and call the get method to get the execution result of the task. However, if the ...

Posted by barbs75 on Sun, 22 Mar 2020 07:44:28 -0700

Collection interface for day20_java collection

Overview of the Java Collection Framework On the one hand, object-oriented languages represent things in the form of objects. In order to facilitate the operation of multiple objects, objects need to be stored.On the other hand, there are drawbacks to using Array to store objects, while Java collect ...

Posted by grissom on Thu, 12 Mar 2020 18:17:05 -0700

IoC in spring

Article directory 1. Spring's IoC core container 2. Details of spring's bean management 1. Three ways to create bean s 2. Scope of bean 3. Life cycle of bean object 3. Dependency injection in spring 1. Use constructor 2. Use set method (more commonly used) 3. Use notes 4.Spring configuration note ...

Posted by adrian_melange on Thu, 12 Mar 2020 01:58:01 -0700

Spring Boot 2.x Actual Warfare--First Spring Boot Program

Spring Boot 2.x Actual Warfare--First Spring Boot Program The Spring Boot 2.X Actual Warfare series will be divided into the following modules. This section will build a RESTful API and customize the return data and HTTP return codes, as well as the data passed to the API interface. The next section will integrate Log4j2 with Slf4j for log prin ...

Posted by sdyates2001 on Tue, 10 Mar 2020 09:42:36 -0700