I. Spring annotation @ ComponentScan

Spring annotation @ ComponentScan [1] @ ComponentScan annotation @ComponentScan is mainly to define the path of scanning, find out and identify the classes to be assembled, and automatically assemble them into the bean container of spring. [2] detailed use of @ ComponentScan annotation 1. Create a configuration class and add @ ComponentScan ann ...

Posted on Thu, 24 Oct 2019 07:47:07 -0400 by saeeddeep

Sample of Spring Boot - 050 mybatis semi-automatic database reading

Sample of Spring Boot - 050 mybatis semi-automatic database reading jpa hibernate Automatic Reading database is more convenient for single table operation, and it is more difficult to use jpa for complex query statements. This demo demonstrates how to use mybatis to operate the database semi automati ...

Posted on Thu, 24 Oct 2019 06:50:20 -0400 by genecide

Build SpringBoot - build project, configure data source

Build a SpringBoot (I) build project and configure data sources Create or download a pure SpringBoot Demo https://start.spring.io custom create Download IDE creation Modify configuration Startup Test Configure mybatisPlus Configure multiple data source files Configure MyBatisPlus Create or d ...

Posted on Thu, 24 Oct 2019 06:43:18 -0400 by drak

Summary of spring boot 2.x file path mapping problems

When we are running the executable java jar package, we can't change the contents of the jar, so the file upload path has become a problem that we must consider. We can't write files directly into the jar package, so we can only write them outside the jar package, but how to download files through the built-in tomcat when writing outside the ja ...

Posted on Thu, 24 Oct 2019 04:52:38 -0400 by keithh0427

Spring Boot2 series of tutorials understand the principle of automatic configuration

Spring Boot The automatic configuration in is really attractive, and even some people say that Spring Boot brings Java life again. Although it sounds a bit exaggerated, it is undeniable that the once cumbersome and cumbersome Spring configuration really makes people feel big, and the new automatic configuration brought by Spring Boot really all ...

Posted on Thu, 24 Oct 2019 03:49:30 -0400 by EWaveDev

Analysis of web application initializer in Spring

WebApplicationInitializer in Spring 1. WebApplicationInitializer With the gradual substitution of JavaConfig configuration mode for configuration, WebApplicationInitializer can be regarded as the substitution of Web.xml. This interface will record the implementation class of this interface when the Web container starts, so as to play the role ...

Posted on Wed, 23 Oct 2019 22:10:51 -0400 by NightFalcon90909

Deep analysis of Spring Boot source code, see the salary dare to 30K!

1. Instantiate SpringApplication SpringApplication.run(BootifulApplication.class, args); public static ConfigurableApplicationContext run(Class<?> primarySource, String... args) {return run(new Class<?>[] { primarySource }, args);}​​​​​​​ public static ConfigurableApplicationContext run(Class<?>[] primarySources, String ...

Posted on Wed, 23 Oct 2019 18:35:23 -0400 by NightCoder

Spring +redis publish subscription mode pit filling record

First, bag Pay attention to the version relationship. In order to keep the version of spring unchanged, the version of spring data redis is reduced to 1.6.4. It is recommended that jedis 2.9.0 correspond to spring data redis 1.8.1 on the Internet. However, the version of spring should also be cons ...

Posted on Wed, 23 Oct 2019 17:35:58 -0400 by danmon

Getting started with Spring Boot: integrating Quartz timed tasks

Continuation of this film< Getting started with Spring Boot (8): integrating RabbitMQ message queuing >, refer to< Getting started with basic use of Quartz (version 2.3.0)> spring boot implements timing tasks. In addition to integrating Quartz, you can also directly use the scheduler annotation. It can be done with a simple annotat ...

Posted on Wed, 23 Oct 2019 15:23:02 -0400 by BrentonHale

Getting started with Spring Boot: integrating swagger2

This article is based on the previous one.< Getting started with Spring Boot (6): integrating treetable and zTree to implement tree chart >, this article mainly introduces the spring boot integration swagger2. About swagger, Google. I have related video materials purchased on the Internet, and can call me if necessary. 1. Introduce relat ...

Posted on Wed, 23 Oct 2019 13:28:28 -0400 by londonjustin