springboot2 refers to static resource files and sets interceptors and decorative icons

springboot2 refers to static resource files and sets interceptors and decorative icons 1. structure 1.1 guide pack 1.2 Configuration of resources 1.21 application.properties configuration 1.22 WebStatic Config configuration 1.23 Configure Home Page Access and Interceptor 1.24 Place configuration in ...

Posted on Wed, 02 Oct 2019 08:41:51 -0400 by vcodeinfotec

SpringBoot exception handling and unit testing

I. Exception handling in SpringBoot 1 SpringBook provides five ways to handle exceptions 1.1 Custom Error Page SpringBoot default exception handling mechanism: SpringBoot default has provided a set of exception handling mechanism. Once an exception occurs in the program, SpringBoot sends a request ...

Posted on Wed, 02 Oct 2019 07:38:12 -0400 by Chad11

springBoot Implements Web Socket Message Push

First, enter the following code in the page: First: Front-end code <script> var websocket = null; if('Websocket' in window) { websocket = new WebSocket('ws://Here is the address of the page you want to implement. }else{ alert('This browser does not support websocket'); } websocket.o ...

Posted on Wed, 02 Oct 2019 06:01:19 -0400 by arsenalfan14

Spring+Mybatis Connects Multiple Databases

1. demand Development starts with requirements or project situations. The project uses several simple databases and tables, but because they are simple, they are all configured in a mapper. That is, a mapper needs to correspond to multiple databases. The database configuration file should be placed i ...

Posted on Wed, 02 Oct 2019 04:12:40 -0400 by saito

Basic use of Dubbo in Springboot and Spring

Dubbo usage steps SpringBook approach Step 1: Introducing dependencies Add the following dependencies to the pom.xml file in the service provider and consumer Engineering <!-- Dubbo Spring Boot Starter --> <!-- Introduce Dubbo Core library and introduction SpringBoot Automatic Configurati ...

Posted on Wed, 02 Oct 2019 03:23:13 -0400 by Fakcon

MVC-15 Custom Interceptor-Interceptor Stack

custom interceptor 1. Techniques similar to filters 2. When sending a request, the interceptor intercepts it and adds additional functions before and after the controller. Distinguish from AOP. AOP extends before and after a particular method (for Service Impl) Interceptor, request interception. ...

Posted on Wed, 02 Oct 2019 02:23:54 -0400 by devarishi

Dubbo usage steps

Dubbo usage steps SpringBook approach Step 1: Introducing dependencies Add the following dependencies to the pom.xml file in the service provider and consumer Engineering <!-- Dubbo Spring Boot Starter --> <!-- Introduce Dubbo Core library and introduction SpringBoot Automatic Configurati ...

Posted on Wed, 02 Oct 2019 00:05:31 -0400 by phpfreakjav

ssm Integration Exercise

1. Create a database Create databases and table structures 2. Import the required jar packages 1) spring and spring MVC 2) Mybatis and mybatis-spring packages 3) Data Driven Package 4) Connection pool package 5) json dependency packages 3. Consolidating configuration files dao 1)SqlMapConfig.xml 2 ...

Posted on Tue, 01 Oct 2019 22:26:57 -0400 by phpete2

Error logging during Spring Boot Admin build

Today, try adding Spring Boot Admin to the project, which is a Web application for managing and monitoring Spring Boot applications. It is divided into Server and Client. Each application is regarded as a client and registered with the management server. The implementation principle is based on the endp ...

Posted on Tue, 01 Oct 2019 21:16:19 -0400 by adams0423

java design pattern-policy pattern

Noun interpretation Strategy Pattern Define a series of algorithms, encapsulate them one by one, and make them interchangeable. This pattern allows the changes of algorithms to not affect the users who use them. Application scenario There are many classes in the system, and the only difference be ...

Posted on Tue, 01 Oct 2019 21:12:29 -0400 by newb