[Java] exception handling and error page assignment of SpringBoot
part error and exception handling mechanism
1, Errors and exceptions
Error Exception Error is often something that cannot be handled by the program (an error introduced by the user or a system error) Exception is caused by the programmer and can be handled in the program. try catch / throws
Excellent handling mechanism
Question: how to deal ...
Posted by HairyScotsman on Sun, 10 Oct 2021 03:40:47 -0700
2-Spring-xml based configuration bean
Spring - configuring bean s based on xml
1, Four methods of Bean instantiation
Premise: all classes managed by Spring are required to provide open and parameter free constructs. Tell Spring how to get the object of the class through the Bean tag
1.1 nonparametric construction method (most commonly used in development)
First write a po ...
Posted by Dream$of$uccess on Sun, 10 Oct 2021 03:28:59 -0700
Preliminary exploration of Spring
1. Format update of beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd ...
Posted by seavolvox on Sun, 10 Oct 2021 02:34:29 -0700
Detailed explanation of propertyresourceconfigurator and its subclasses of Spring
1, Propertyresourceconfigurator class
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless ...
Posted by mpirvul on Fri, 08 Oct 2021 17:45:57 -0700
❤️ — Spring from introduction to God -- Spring integrates MyBatis
The persistence layer framework used before is Mybatis. Now Mybatis framework is integrated into Spring framework and managed by Spring. Its core idea is to store the implementation class objects corresponding to Mapper in IOC container
Overall idea: 1. Build the Mybatis framework in the original way 2. Build the Spring framework in the ...
Posted by subrata on Fri, 08 Oct 2021 03:45:42 -0700
Spring 5 learning notes
Spring 5 learning notes
[!TIP]
The notes are summarized from Bili Bili crazy God said spring 5.
1. Introduction
1.1 INTRODUCTION
[!NOTE]
The Spring framework is due to software development Created by the complexity of. Spring uses a basic JavaBean to do this. Previously, it could only be done by EJB Things done. However, the ...
Posted by medar on Thu, 07 Oct 2021 20:22:36 -0700
How to dynamically load the log file path in [Spring] log4j2.xml
Note: it is only for Spring projects, not for Spring boot and Spring cloud
Project scenario:
The project framework is Spring + spring MVC + mybatis. When the project starts, different configuration files are loaded, and then the effect of different environments is achieved. It can be understood that there are four configuration files a.proper ...
Posted by phencesgirl on Thu, 07 Oct 2021 18:13:51 -0700
Simple principles and differences of Java interceptors, filters, and listeners
1. Interceptor concepts
Interceptors in java are objects that dynamically intercept action calls, providing a mechanism for developers to execute a piece of code before and after an action is executed, or within an Action
Blocking execution before execution also provides a way to extract reusable parts of code in an Action. In AOP, intercepto ...
Posted by gabrielserban on Thu, 07 Oct 2021 17:49:30 -0700
The sharp blade comes out of the scabbard and Mybatis is initialized
1, Foreword
For any framework, a series of initialization is required before use, and MyBatis is no exception.
2, What did the initialization of MyBatis do
2.1 the initialization process of mybatis is the process of loading the configuration information required by its own runtime
The initialization of any framework is nothing more than ...
Posted by ghostdog74 on Thu, 07 Oct 2021 17:00:31 -0700
spring-07-proxy mode
proxy pattern
The proxy pattern is the bottom layer of spring AOPAgent mode classification: static agent and dynamic agent
1. Static proxy
Role analysis Abstract role: it is usually solved by using interfaces or abstract classes Real role: the role represented Proxy role: represents a real role. After representing a real role, there will be ...
Posted by birdie on Thu, 07 Oct 2021 11:44:01 -0700