Use of Spring exception handler

Global exception handling using enhanced ControllerThe so-called enhanced Controller is the @ ControllerAdvice annotation. Some annotations of the methods in the class with this annotation will be applied to all controllers, including the @ ExceptionHandler annotation.So you can write a global exception handling class: /** * Created by 47 * ...

Posted by roel_v on Wed, 11 May 2022 02:39:57 +0300

MyBatis learning notes (including SSM integration and reverse engineering)

1. Introduction to mybatis 1.1 what is MyBatis? MyBatis official website MyBatis is an excellent persistence layer framework that supports common SQL queries, stored procedures and advanced mapping. MyBatis eliminates almost all the manual setting of JDBC code and parameters and the retrieval of result sets. MyBatis uses simple XML or ann ...

Posted by kyme on Tue, 10 May 2022 16:23:56 +0300

The difference between log4j and slf4j

log4j Log4j is an open source project of Apache. We can control log information through it. The output destination is console and file Usually in log4j Properties in configuration Function: control the format and process of each log output Configuration details: # Global logging configuration log4j.rootLogger=DEBUG, stdout # Console output... ...

Posted by nikifi on Tue, 10 May 2022 15:48:02 +0300

Learn spring MVC notes

configuration file mvc:default-servlet-handler/ mvc:annotation-driven/ <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springfram ...

Posted by SteveMT on Tue, 10 May 2022 15:08:48 +0300

SSM framework: SSM integration case

Integrated thinking Step 1: build an integrated environment Step 2: build a Spring development environment Step 3: integrate Spring MVC with Spring Step 4: integrate Mybatis with Spring We first configure each framework to ensure that each framework can be executed separately, and then carry out the integration operation. Integrated environme ...

Posted by eyegraphix on Tue, 10 May 2022 12:13:18 +0300

Spring aspect oriented AOP

1, Dynamic agent 1. Export mode Code confusion: after more and more non business requirements (logging, verification, etc.) are added, the original business methods expand sharply Each method must take into account many other concerns while dealing with the core logic Code dispersion: take the log requirement as an example. In order to m ...

Posted by Bad HAL 9000 on Mon, 09 May 2022 23:03:52 +0300

springboot custom Cache @ Cache

Statement: If the article is inappropriate, please summarize it for your own reference.   The source code of this article has been uploaded to Baidu online disk. Link: https://pan.baidu.com/s/1lS6Ff6gZFk6mirEagP-rcQ Extraction code: ric4   Spring Boot is a new framework provided by pivot team. It is designed to simplify the initial const ...

Posted by jacko_162 on Mon, 09 May 2022 15:19:03 +0300

Spring AOP dynamic proxy

Source: Liao Xuefeng's official website In AOP programming, we often encounter the following concepts: Aspect: aspect, that is, a function across multiple core logic, or system concern; Joinpoint: connection point, which defines where to insert the execution of the aspect in the application process; Pointcut: entry point, that is, a set of con ...

Posted by BRUUUCE on Mon, 09 May 2022 11:11:16 +0300

Initialization of Spring container ApplicationContext

preface Taking the spring container created in the Web project as the starting point, this paper describes the initialization process of WebApplicationContext. Spring version 4.3.18 RELEASE. 1, Initialization entry In the development of Web project based on Servlet+Spring, if the implementation class of WebApplicationContext is no ...

Posted by g00fy_m on Sun, 08 May 2022 20:14:13 +0300

SpringBoot2.x+Spring5+Mybits3.x later use vue front-end to build front-end and back-end separation-1 to get to know the new SSM

catalogue What is annotation What is the Spring framework Relationship between SpringBoot and SpringClound Common SpringBoot project development methods Recommended solutions for learning new technologies What is annotation Java annotation is some meta information attached to the code, which is used for parsing and using some tools dur ...

Posted by chigley on Sun, 08 May 2022 09:10:50 +0300