Add jedis dependency
Add dependency in project pom.xml file
<!-- Add to jedis rely on -->
Add redis configuration
Find the application.properties file in the project resources directory to add reids co ...
Posted on Tue, 31 Mar 2020 20:31:03 -0400 by Bunkermaster
Continue to summarize the work of Java background 2
Previously, I wrote a SSM to replace c3p0 data source with Druid: https://blog.csdn.net/larger5/article/details/79509895
Recently, projects are basically based on SpringBoot. Similarly, using Druid as data source is also a very simple operation and principle
Posted on Tue, 31 Mar 2020 07:33:34 -0400 by imranlink
In the process of web development, in order to implement login authorization verification, we often need to add an interceptor to implement login verification when the user's request reaches the controller layer. How can spring boot add an interceptor?
The steps are as follows:
1. Inherit the WebMvcConfigureAdapter class, override its addInte ...
Posted on Tue, 31 Mar 2020 05:49:27 -0400 by jasonc
Because the MongoDB needs to be accessed, but the local development environment cannot directly connect to MongoDB, the 127.0.0.2 local IP agent needs to be used through SecureCRT. However, after the program is deployed to the online production environment, it can directly access MongoDB. Therefore, after the program is developed, you always ne ...
Posted on Tue, 31 Mar 2020 04:31:59 -0400 by pandu345
The back-end service needs to use http client to request other service support. In the project, HttpClient needs to be replaced with okhttp. Why should okhttp be replaced? The advantages and disadvantages between the two are not discussed here. This article focuses on integrating okhttp with Spring's traditional xml configu ...
Posted on Tue, 31 Mar 2020 02:35:31 -0400 by Joseph Witchard
1. Modify mybatis.properties
#Master data source, default
#Initialization size, min, Max
Posted on Tue, 31 Mar 2020 02:03:59 -0400 by ashley526
Original Link: http://www.yiidian.com/springmvc/return-value.html
The controller method return value of Spring MVC can support multiple writings, each of which has a different scene and effect.Here's a look at the use of each return value.
1 Normal string
Returning normal st ...
Posted on Mon, 30 Mar 2020 21:15:39 -0400 by lunac
In dubbo source code, extension loader is often used, which uses java SPI mechanism.
ProxyFactory proxyFactory = ExtensionLoader.
Protocol protocol = ExtensionLoader.
1. Judge whether the clas ...
Posted on Mon, 30 Mar 2020 15:33:47 -0400 by hrichman
Environment module is the basic module that we seldom use, but it will be used. Just think of the environment as a map, from which you can get the configuration. This festival makes the bird dishes pale and powerless. It's too simple. It's not enough. We need to understand it
Source code interpretation
public interface En ...
Posted on Mon, 30 Mar 2020 15:31:43 -0400 by thosecars82
When using springboot for development, unit testing is necessary. When you build a spring project, it will generate a test project for us. When your project starts, the test cases are carried out at the same time. When we carry out the integration test of the WEB layer, we can use the WebTestClient tool provided by spring for us, which is very ...
Posted on Mon, 30 Mar 2020 14:33:54 -0400 by nkyoung1