Interceptors and exception handlers

1. Interceptor 1.1 interceptor configuration Interceptors in spring MVC are used to intercept the execution of controller methods Interceptors in spring MVC need to implement HandlerInterceptor Specific operation The interceptor of spring MVC must be configured in the configuration file of spring MVC (springMVC.xml): a. Intercept all p ...

Posted by djmc48 on Wed, 06 Oct 2021 01:31:12 +0200

MyBatis Plus rookie quick start

MyBatis Plus Domestic open source framework based on MyBatis The core function is to simplify the development of MyBatis and improve efficiency. MyBatis Plus quick start 1. Create a springboot project 2. Import the dependency of mybatisplus <dependency> <groupId>com.baomidou</groupId> <artifa ...

Posted by Brad420 on Tue, 05 Oct 2021 23:11:59 +0200

Spring boot + mybatis plus to implement CRUD common simple version

Mybatis Plus Today's goal: Understand the features of mybatisplusGet started with mybatisplusBe able to master the common annotations of mybatisplusBe able to master the common additions, deletions, modifications and queries of mybatisplusBe able to master mybatis plus automatic code generation 1 MybatisPlus overview MyBatis plus (MP for sh ...

Posted by t_galan on Tue, 05 Oct 2021 20:05:00 +0200

SSM framework integration - achieve basic CURD effect

1. Build environment Create a basic Maven project and import the dependencies required by the project <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven. ...

Posted by saronoff on Sun, 03 Oct 2021 21:24:03 +0200

MyBatis study notes

MyBatis 1, Framework overview 1. Three tier architecture Interface layer: deal with users, accept user request parameters and display processing results. (jsp,html,servlet)Business logic layer: accept the data transmitted by the interface layer, calculate logic, call the database and obtain data.Data access layer: it is to access the datab ...

Posted by etnastyles on Sun, 03 Oct 2021 01:15:55 +0200

AOP introduction: dynamic agent

AOP introduction: dynamic agent Before introducing AOP, let's introduce the knowledge of dynamic agent Let's give you a simple example. Now we have the following user interface and its implementation class (for convenience, only the corresponding statements are printed in the implementation class) package com.zy.service; public interface us ...

Posted by atticus on Fri, 01 Oct 2021 00:31:51 +0200

SpringBoot 2. X basic tutorial: integrating Thymeleaf with SpringBoot

Micro signal: hzy1014211086. If you are learning Spring Boot, you can join our Spring technology exchange group and grow together For Web projects, the front-end and back-end separation mode is the most popular. At present, the front-end framework is very perfect, and the front-end and back-end separation scheme is also very mature. Th ...

Posted by imcomguy on Wed, 29 Sep 2021 05:17:05 +0200

SpringBoot - Implements the execution of specified tasks at startup (CommandLineRunner, ApplicationRunner)

Narration Sometimes special tasks need to be performed at system startup, such as configuration file loading, database initialization, etc. Spring Boot provides two solutions: CommandLineRunner and ApplicationRunner. They are used in a similar way, and the differences are mainly reflected in the parameters. Solution CommandLineRunner 1. In ...

Posted by atrum on Tue, 28 Sep 2021 18:43:28 +0200

Spring bean auto assembly

automatic assembly Automatic assembly is a way to use spring to meet bean dependencies. Spring will find the bean that a bean depends on in the application context. There are three assembly mechanisms for bean s in Spring: Explicit configuration in xml;Explicit configuration in java;Implicit bean discovery mechanism and automatic assembly. ...

Posted by phpcharan on Tue, 28 Sep 2021 12:08:13 +0200

Integration of Spring and Mabatis

1, Data source         We can use mybatis's own data source or external data sources, such as dduid, C3P0 and Proxool. Here, I use C3P0. The most important XML configuration file in spring is ApplicationContext.xml. In order to facilitate our writing, I directly name the file beans.xml, and then inject C3P0 through attribu ...

Posted by speedamp on Sun, 26 Sep 2021 20:52:06 +0200