SpringBoot learning seckill II. jsr303 calibrator

Form verification is an indispensable link when we submit a form. The common verification method is to judge each parameter separately, but this is not only troublesome, but also if we write too many if parameters, the code will be bloated and the readability will be poor. Take login as an example, supp ...

Posted on Sat, 22 Feb 2020 09:33:57 -0500 by plazz2000

Play with spring boot 2. X's fast integrated Jedis client (normal version)

Preface In Java development, you usually choose the Jedis client to perform Redis related operations. In this article, you can use the spring boot project to quickly start Jedis related operations. Code case Basic configuration operation The specific code is as follows: <dependency> <gro ...

Posted on Sat, 22 Feb 2020 07:29:31 -0500 by JunbinDuan

spring boot -- an example of file upload and download

As for file upload and download, there are many better components that encapsulate in place for us now, and there are few things we need to do in practice. But here we will introduce the file upload based on the Commons file upload component and the file download based on the file stream. File upload ...

Posted on Sat, 22 Feb 2020 04:35:15 -0500 by dscuber9000

About spring auto loading

background As a rule, we need to talk about the background. After all, the problem comes from life, and the difficulty comes from work. If I eat, drink and have no worries every day, I believe I have no problem to write. The company's structure team is pushing a new basic framework, mainly because it is ...

Posted on Sat, 22 Feb 2020 00:25:00 -0500 by natronp

Design Mode_Singleton Mode

An overview of the singleton pattern 1. Core: Ensure that a class has only one instance and provide a global access point to that instance. 2. Advantages of the singleton mode: 1) The performance overhead of the system is reduced because the singleton mode only produces one instance object.When th ...

Posted on Fri, 21 Feb 2020 21:04:40 -0500 by khurramijaz

Building and simple use of the environment for tymeleaf

Comparison between Thymeleaf and JSP Compared with JSP, the Thymeleaf template is native and does not rely on the tag library. It can be edited and rendered where the original HTML is received. Not coupled with servlet specification. There are some problems with JSP running on the embedded servlet con ...

Posted on Fri, 21 Feb 2020 11:02:12 -0500 by westminster86

springboot web - start to create SpringApplication

1, Test code @SpringBootApplication public class SbmvcApplication { public static void main(String[] args) { SpringApplication.run(SbmvcApplication.class, args); } } My spring boot version here is 2.0.3.RELEASE <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/ ...

Posted on Fri, 21 Feb 2020 09:27:28 -0500 by ojeffery

springboot web - start run()

Pick up another article. After creating SpringApplication, the run() method is called public ConfigurableApplicationContext run(String... args) {   //timer, Monitoring start time StopWatch stopWatch = new StopWatch(); stopWatch.start(); ConfigurableApplicationContext context = null; Collection<SpringBootExceptionReporter&g ...

Posted on Fri, 21 Feb 2020 08:55:18 -0500 by woodplease

srpingboot web - start listener

Pick up another article. 1, getRunListeners() The getRunListeners(args) method is called in the run() method, first look at what this method has done. private SpringApplicationRunListeners getRunListeners(String[] args) { Class<?>[] types = new Class<?>[] { SpringApplication.class, String[].class }; return new SpringApplica ...

Posted on Fri, 21 Feb 2020 07:59:13 -0500 by bbristow

A simple addition, deletion, modification and query of sprigboot+jpa

Recently, I have taught myself some basic usage of springboot on mooc.com, and I have learned some relevant knowledge on the way to use it. Next, I will write down my learning achievements: This record is a simple addition, deletion, modification and query of mysql database using springboot+jpa. After a ...

Posted on Fri, 21 Feb 2020 05:03:10 -0500 by kyllerj