Understanding of ChangeStream function of Mongo database

Only in cluster mode mongo Can be used changeStream The function of, This function is mainly to monitor in real time mongo Changes to the database, And obtain the changed information, changeStream The principle is to monitor all the time mongo of opLog Log changes to this file, To read this file, as we all know, we have mongo The database will ...

Added by avario on Tue, 08 Mar 2022 11:17:43 +0200

Four ways for Spring Boot to implement timed tasks

Several ways to realize scheduled tasks: Timer: This is java. Com that comes with java util. Timer class, which allows you to schedule a java util. TimerTask task. In this way, you can make your program execute at a certain frequency, but it can't run at a specified time. Generally used less. ScheduledExecutorService: also jdk's own class; It ...

Added by newman on Tue, 08 Mar 2022 08:58:20 +0200

The new SpringBoot tutorial of the required framework (Part 2)

Personal profile The author is a junior from Heyuan. The following notes are some shallow experience of the author's self-study road. If there are mistakes, please correct them. In the future, we will continue to improve our notes to help more Java lovers get started. SpringBoot+JDBC 1. Import JDBC and mysql dependencies In POM XML import t ...

Added by jredwilli on Tue, 08 Mar 2022 07:59:29 +0200

SpringBoot notes 01 -- Brief principles of spring IOC

SpringBoot notes 01 – Spring IOC 1. IOC 1.1 what is IOC The full name of IOC is Inversion of Control, which is a design concept. In the traditional Java SE code, objects are created through new inside an object, which is the program's initiative to create the objects to rely on. The idea of IOC is to design a container to create these ...

Added by Wabin on Tue, 08 Mar 2022 06:12:49 +0200

Spring boot automatic assembly principle

What does springboot automatically configure for us? What can we change? Three core: spring. Factories (various automatic configuration classes)XXAutoConfiguration (autoconfiguration class)Xxproperties (property injection modification) 1. Principle of automatic assembly (most important) pom. Since the import of XML configuration, the core l ...

Added by markspec87 on Mon, 07 Mar 2022 21:22:31 +0200

SpringBoot project started without listening port

premise Our SpringBoot project relies on Dubbo, RocketMQ, Nacos, etc. occasionally one day, we found that we didn't register with SpringBootAdmin after startup, so we checked the reasons, searched online and found this article The springboot project starts and runs normally, but the port cannot listen for events and solutions The situation is ...

Added by apulmca2k4 on Mon, 07 Mar 2022 20:33:16 +0200

Spring boot integrated web development

Spring boot integrated web development The format of json returned by web dependency Jackson databind is added to this dependency by default As a JSON generator, there is no need to add additional JSON at this time The manager can return a section of JSON. Custom converter: 1. Integrated Gson Besides Jackson databind, the common json pro ...

Added by konrados on Mon, 07 Mar 2022 16:59:05 +0200

Spring Boot ------- integrated Shiro

Spring Boot (14) -- Integrated Shiro 23. Introduction to Shiro 23.1 what is Shiro Apache Shiro is a security (permission) framework for JavaShiro can easily develop good enough applications, which can be used not only in Java se environment, but also in Java EE environmentShiro can complete: authentication, authorization, encryption, session ...

Added by kinadian on Mon, 07 Mar 2022 14:32:32 +0200

springboot feign is simply combined with hystrix fuse

In terms of interface calls, Spring Cloud will generally go through the cooperation of the following components: Feign - > hystrix - > ribbon - > HTTP client (apache http components or Okhttp), as shown in the following figure: (1) Interfaced request call when calling the interface modified by @ FeignClient annotation, convert the req ...

Added by nick2005 on Mon, 07 Mar 2022 13:17:52 +0200

registerListeners() of Spring source code and publish subscribe mode

registerListeners() of Spring source code and publish subscribe modeHello, I'm classmate Tian, a programmer.Today, let's explain the registerListeners() method in the refresh() method, which is often referred to as the publish subscribe mode of Spring. This paper first gives an example of publish subscribe mode, then explains the principles of ...

Added by pablocullen on Mon, 07 Mar 2022 10:42:16 +0200