Java fun sharing: try & finally
Consider the following four test methods, and what do they output?
public class Test {
public static void main(String\[\] args) {
System.out.println(test1());
System.out.println(test2());
System.out.println(test3());
System.out.println(test4());
}
private static int test1() {
int i = ...
Posted by nayone on Fri, 08 May 2020 07:31:28 -0700
Spring boot2. X Quick Start Guide
Spring boot2. X Quick Start Guide (1)
preparation
IDE: IntelliJ IDEA 2020.3
Java environment jdk1.8
Quickly create spring boot project on the official website
Now let's get to the point:Get into https://start.spring.io/ Build an initial projectHere you will download a zip project package
Using Maven to import the Spring Boot project
Rememb ...
Posted by Francky683 on Thu, 07 May 2020 20:22:11 -0700
Java paging data through laypage plug-in of layui
Recently, you need to paginate the data on a page of spring MVC + mybatis project. The general idea is to create two hidden input boxes on the page to save the pageNum of the current page and the number of pieces of data displayed on each page pageSize. Modify the corresponding values each time you paginate, and then transfer the pageNum and pa ...
Posted by w00kie on Thu, 07 May 2020 07:05:21 -0700
How does Netty work in Dubbo?
Author: Mona Rudowhttps://www.cnblogs.com/stateis0/p/9062171.html
As we all know, the bottom layer of Dubbo, a well-known domestic framework, is Netty As a network communication, how on earth is it used internally?Today we'll explore.
1. How Dubbo's Customer uses Netty
Note: This code uses the dubbo-demo example from the Dubbo source of clo ...
Posted by DaveMate on Wed, 06 May 2020 19:59:44 -0700
Configuration file@Configuration Properties reads List, Map parameters
background
In the SpringBoot environment, we have "incomplete" annotations.This is why SpringBoot replaces the xml configuration in traditional Spring projects.When using these annotations, we must understand the principles and conventions behind these annotations.
package org.springframework.boot.context.properties;
import java.lang ...
Posted by gtal3x on Wed, 06 May 2020 09:32:15 -0700
Use JavaScript to complete all or none of the check boxes
Select all or none of the check boxes
requirement analysis
In the commodity classification interface, when we click the select all box, we want to select all the commodities. When we cancel, we want to uncheck all the commodities
technical analysis
checked="checked" select the check box
Event: onclick click event
getElementsByTagName: ...
Posted by Kasuke_Akira on Wed, 06 May 2020 08:07:20 -0700
SpringBoot integrates Quartz for timed tasks
1 Requirements
One of the functions in my front-end and back-end separated lab management project is student status statistics.My design is to calculate the proportion of each state by day.For ease of calculation, at 0 o'clock a day, the system needs to reset the student's status and insert a piece of data as the start of the day.In addition, c ...
Posted by e-novative on Tue, 05 May 2020 18:44:49 -0700
Spring propagation mechanism-Propagation.REQUIRED
Most of the statements on the Internet are "if there is a transaction, the current transaction is supported.". Open if no transaction "
It's just a silly face...
My understanding at the beginning is that if the save method is called, a transaction will be opened when the transaction is executed to userMapper.save. At this time ...
Posted by drakkon on Tue, 05 May 2020 11:53:30 -0700
Love! Share a spring boot based API, restful API project seed (skeleton)
Preface
Recently, I have used Spring Boot with MyBatis, general Mapper plug-in and PageHelper paging plug-in to do several small and medium-sized API projects. I feel that it is very comfortable to develop this project with this set of framework and tools, and the team's response is also good. In the process of project construction and develop ...
Posted by northk on Tue, 05 May 2020 03:08:29 -0700
Spring AOP - Advanced Details
Spring AOP-Advanced
Come on, go straight to the case description: Whoop.....
1. Advanced Case 1: Defining a public entry point
Sketch
There are many notifications in the facet class, most of which have the same entry point.
For ease of entry point management and maintenance, use a common entry point.
@Pointcut
Method modifier:private ...
Posted by furiousweebee on Mon, 04 May 2020 20:09:46 -0700