Architect's mental skill, detailed explanation of the state mode of participating in e-commerce order business development

State mode is also common in life scenes. For example, we usually change the order status of online shopping, as well as the status of taking the elevator. In the process of software development, there may be different situations for a certain operation. Generally, the most direct way to deal with multi situation problems is to use if...else o ...

Posted by fuji on Sat, 21 Mar 2020 00:23:03 -0700

Injecting StringRedisTemplate exception into SpringBoot

StringRedisTemplate was used in writing a mall project and the result test started incorrectly: BeanCreationException: Error creating bean with name 'userController': Injection of resource dependencies failed, BeanNotOfRequiredTypeException: Bean named 'redisTemplate' is expected to be of type 'org.springframework.data.redis.core.StringRedisTe ...

Posted by JAM on Fri, 20 Mar 2020 22:58:43 -0700

Java Proxy Mode and Dynamic Proxy Details

Java's dynamic proxy has a wide range of usage scenarios in practice, such as Spring AOP for the most scenarios, acquisition of Java annotations, logging, user authentication, and so on.This article takes you through proxy mode, static proxy, and native dynamic proxy based on JDK. proxy pattern Whether you are learning static or dynamic proxies ...

Posted by Majes on Fri, 20 Mar 2020 21:05:53 -0700

Dubbo Source Learning-Service Reference (Service Startup Phase)

In the previous article, we looked at the process of publishing a dubbo service, and this article outlined the process of analyzing dubbo service references. 1. What should service consumers do? Generate proxy objects (help us achieve communication details) Set up a communication connection (netty) Get the service provider address (subscript ...

Posted by gooman on Fri, 20 Mar 2020 19:56:52 -0700

java object oriented 2 (32) reflection advanced + Advanced explanation

Reflection advanced explanation Warm reminder: if you don't know much about reflection, you can go to a few introductory articles to learn more! Review: Why reflection: call private content in a class at will. Class is more flexible.   Reflection: get a member method / member variable in a class specifically   Reflection fixation steps: ...

Posted by paulb on Fri, 20 Mar 2020 12:01:37 -0700

Auto configuration of spring boot

Spring boot auto configuration is mainly completed by @ EnableAutoConfiguration, @ Conditional, @ EnableConfigurationProperties or @ ConfigurationProperties.@EnableAutoConfiguration enables automatic configuration. Its main function is to call loadFactoryNames() in the spring core package to load the written automatic configuration in th ...

Posted by StateGuy on Fri, 20 Mar 2020 11:02:12 -0700

Using Docker to build ZooKeeper cluster in CentOS 7

1. First, Docker should be installed in CentOS 7, Docker installation reference 2. Pull the docker image of ZooKeeper and go to https://hub.docker.com/ Search relevant zoomkeeper images on docker pull zookeeper:3.4.14 3. Create three folders corresponding to three containers on the host computer /root/zookeeper01/conf /root/zookeeper01/d ...

Posted by mcollyns on Fri, 20 Mar 2020 07:59:17 -0700

Share some best practices of PHP coding

For starters, it may be difficult to understand why some practices are safer. However, some of the following tips may be beyond the scope of PHP.   Always use braces Let's look at the following code: if (isset($condition) && true === $condition) echo 'this is a success'; //It's true, but look at the code below if (isset($condi ...

Posted by Boerboel649 on Fri, 20 Mar 2020 01:47:57 -0700

Three Uses and Source Interpretation of Spring Import

_Recent reviews of Spring Cloud-related sources have added enable s to each new starter, such as: @EnableDiscoveryClient, which registers applications with Eureka Server and pulls services owned by Eureka Server into a micro-service system.Click on the EnableDiscoveryClient source code and you will find the @import annotation inside.The ...

Posted by thomashw on Thu, 19 Mar 2020 17:55:50 -0700

[Spring Security + OAuth2 + JWT introduction to actual combat] 22. Transformation of social login

brief introduction SDK is generally provided for APP social login. There are two situations for SDK First kind SDK provider returns openId and logs in to our interface system with openId to apply for token Create the OpenIdAuthenticationToken class: /** * */ package com.spring.security.social.openid; import java.util.Collection ...

Posted by pinhead on Thu, 19 Mar 2020 11:07:48 -0700