Simple Factory Mode for Design Mode

Simple Factory Mode Basic Definition: Simple factory mode, also known as static factory method, is a creation mode.In simple factory mode, instances of different classes can be returned depending on the parameters passed.The Simple Factory pattern defines a class specifically for creating instances of other classes that share a common parent. P ...

Posted by darthmahon on Thu, 16 Apr 2020 08:53:53 +0200

Note development learning notes

Preface Because of playing the play framework before, I don't know much about springboot; I have many doubts: ① How can custom annotations work in springboot ② How does the annotation plug-in like Lombok change the generated code Lombok plug-in Today, I found an online post called "Lombok", and I understood my doubts ...

Posted by mjurmann on Sun, 12 Apr 2020 06:03:40 +0200

SpringBoot -- implementation of login verification code

Today record the implementation of verification code, hope to help you! First, let's look at the effect of the implementation:   The implementation of this verification code does not use too many plug-ins. If you don't speak much, you can directly use the code. You can take it. The org.apache.commons.lang3.RandomUtils tool class is used in the ...

Posted by mubashir on Thu, 09 Apr 2020 17:41:52 +0200

springboot uses the PropertyResource annotation to read the properties of the specified configuration file (podcast code)

Chapter one: SpringBoot/Spring uses @ Value for attribute binding (podcast code for wisdom spreading)   The ConfigurationProperties annotation will read the properties from the global configuration file by default. When there are many properties, the main configuration file(application.yml, application.properties) will be bloated, so it is ne ...

Posted by Nimbuz on Mon, 06 Apr 2020 19:01:17 +0200

Gateway filter batch release url specified by properties -- white list

White list 2.4.1 what is a white list Problem: all requests are blocked and do not meet the actual requirements. (some requests do not need to be intercepted) White list: used to store the request path that does not need to be blocked 2.4.3 implementation Step 1: modify the gateway yml file, and configure the path that does not need to be b ...

Posted by gijs25 on Fri, 03 Apr 2020 07:00:38 +0200

Consul Registry for Micro Services Series

Original Link: https://mrhelloworld.com/posts/spring/spring-cloud/consul-service-registry/ Netflix Eureka 2.X https://github.com/Netflix/eureka/wiki officially announced the suspension of development, but it has little impact on domestic users. On the one hand, Eureka 1.X series is mostly used in China, and the official is actively maintaining ...

Posted by AJW on Fri, 20 Mar 2020 04:53:02 +0100

Switch practice of building multiple data sources with SpringBoot+AOP

I collated Java advanced materials for free, including Java, Redis, MongoDB, MySQL, Zookeeper, Spring Cloud, Dubbo high concurrency distributed and other tutorials, a total of 30G, which needs to be collected by myself.Portal: https://mp.weixin.qq.com/s/osB-BOl6W-ZLTSttTkqMPQ For the common design modules in the microservice architecture, w ...

Posted by Brentley_11 on Thu, 12 Mar 2020 11:00:35 +0100

[Spring Security + OAuth2 + JWT start to practice] 15. User registration after third-party QQ login

brief introduction In the previous article, QQ login is completed. Generally, if the current QQ login user is not registered in our database, he should skip to the registration binding page. If we do not configure the jump page, he will jump to / signup by default Source code analysis Enter social authentication filter private Authenti ...

Posted by v00d00 on Mon, 09 Mar 2020 10:07:29 +0100

Spring boot2. X integrates MQTT to realize message subscription (with source code)

MQTT protocol is widely used in the field of industrial Internet of things because of its low latency and high efficiency. The previous article introduced how to send MQTT message by code. Based on the previous article, this paper implements the subscription and reception of MQTT message.Operation steps: Introduce related dependencies <de ...

Posted by omarh2005 on Sat, 22 Feb 2020 18:27:15 +0100

PriorityBlockingQueue of concurrent queues

This article talks about the PriorityBlockingQueue, a quote from the book: This is the unbounded blocking queue with priority. Every time you leave the queue, you will return the elements with the highest or lowest priority (here the rules can be made by yourself). The internal is implemented by using the balanced binary tree, and the traversal ...

Posted by visualAd on Mon, 10 Feb 2020 09:50:18 +0100