Spring cloud learning notes
SpringCloud
1, Service registration and discovery
Eureka(AP)
Service registration is relatively fast, because there is no need to wait for the registration information to replicate to other nodes, and there is no guarantee that the registration information will replicate successfully;
When the data ...
Posted by taya on Sun, 14 Jun 2020 22:00:02 -0700
[Java] uses reflection to execute the methods specified by Spring container Bean, and supports automatic calling of multiple parameters
catalog
Usage scenarios
objective
Implementation mode
Premise:
thinking
Core class
test method
Source sharing
Usage scenarios
Input the scheduled task into the database (the advantage of this is the visualization of the scheduled task, and the execution time of each task can be modified dynamically), and execute the corresponding method ...
Posted by Chris Val Kef on Sat, 13 Jun 2020 03:06:01 -0700
spring custom filter / interceptor
1, Filter
What is a filter?
You can think of it as a sieve, which filters out some parameters in request and response1. Import related jar packages
Import the common jar package in the pom file
<!-- commons Shared package, used by filter interceptor -->
<dependency>
<groupId ...
Posted by treppers on Sat, 13 Jun 2020 01:35:15 -0700
SpringBoot integrates Swagger2 to generate API interface documentation
SpringBoot 2.3.0 Integrated Swagger2
Introduce Swagger2's corresponding dependencies
Example of getting started
Startup error after SpringBoot2 integration with Swagger2
epilogue
Background: Recent work has found that interface protocols and actual business code provided by back-end developers are ...
Posted by Bad HAL 9000 on Fri, 12 Jun 2020 18:54:35 -0700
Spring event pattern application
I'm the interviewer of Microsoft YaHei: it's 85 years old
Me: Well, 35
Interviewer: that should be very experienced. Let's talk about spring
Me: OK, I've used this for more than 10 years. You can ask me whatever you like
Interviewer: have you ever used events in Spring?
Me: Yes
Interviewer: can you exp ...
Posted by fordyh on Fri, 12 Jun 2020 04:11:34 -0700
SpringBoot injection multi instance, multi thread processing
Another post: Spring Boot tutorial 16: implementing multithreading with Spring Boot injection class
SpringBoot injection multi instance, multi thread processing
Seeing this title, I'm sure many people will be puzzled. Looking back on your own scenarios, we will find that in Spring projects, multithreading is rarely used to process tasks. Y ...
Posted by iwarlord on Thu, 11 Jun 2020 21:37:04 -0700
Spring series. Dependency injection configuration
Configuration of dependency injection
Spring's dependency injection includes constructor based dependency injection and setter based dependency injection.
Constructor based dependency injection
<!-- Dependency injection via constructor parameter index -->
<bean id="byIndex" class="cn.javass.spring.chapter3.HelloImpl3">
&l ...
Posted by jd023 on Thu, 11 Jun 2020 00:44:42 -0700
Alibaba Nacos registry of Spring Cloud series
This is a series of articles. If you haven't read the first episode, please jab here: Alibaba Nacos registration center of Spring Cloud series (I)
This article introduces the construction of Nacos registry cluster environment.
Construction of Nacos cluster environment
The cluster mode is the same as our usual capacity expansion. It ca ...
Posted by moselkady on Wed, 10 Jun 2020 22:20:24 -0700
Spring Security dry goods: how to implement different security policies for different interfaces
1. Preface
Welcome to Read Spring Security Actual Dry Goods Series articles.Recently, a small development partner asked an interesting question.He is working on a project that involves two styles, one is to interface applets and use stateless JWT Token securely, the other is to manage the backend using Freemarker, the Session mechanism that do ...
Posted by mazen on Wed, 10 Jun 2020 19:21:26 -0700
mybatis Source Parsing Interpretation Level 1 and Level 2 Cache
mybatis cache
Mybatis caches have a first-level cache and a second-level cache. Why do mybatis use two caching mechanisms?Let's move on to today's topic with questions.
mybatis Level 1 Cache
When the mybatis cache executes the same SQL and the same parameters, it does not make repeated calls to the ...
Posted by dudeddy on Wed, 10 Jun 2020 09:29:36 -0700