How to solve IF-ELSE in strategy mode

How to use policy pattern to solve excessive if else problems We divide the policy pattern into three parts: the definition of policy, the creation of policy, and the use of policy Definition of policy The definition of policy class is relatively simple, including a policy interface and a group of policy classes that implement the interface. Be ...

Posted by delphi on Sat, 27 Jun 2020 22:10:26 -0700

Playing with Stream in Java 8

Playing with Stream in Java 8 By litesky Link: http://www.jianshu.com/p/11c925cdba50 I believe you have heard about Java8 Stream, but you may not be able to use it or you are not familiar with it. This article will take you to use it from scratch, step by step, and lead you to the peak of Stream. Operator What are operators? Operator is a k ...

Posted by michibk on Sat, 27 Jun 2020 19:14:03 -0700

[open source]. Net uses ORM to access Shenzhou general database (Shentong)

preface Tianjin Shenzhou General Data Technology Co., Ltd. (hereinafter referred to as "Shenzhou general company") is subordinate to China Aerospace Science and Technology Corporation (CASC). Is engaged in the domestic database, big data solutions and data mining analysis product research and development of professional companies. The ...

Posted by cbailster on Sat, 27 Jun 2020 17:55:00 -0700

FreeSql uses ToTreeList/AsTreeCte to query infinite level classification table

On infinite class The first option: Recursion algorithm is also the most frequently used, and most open source programs do the same, but generally only use four levels of classification. The database structure design of this algorithm is the simplest. A field ID and a field FID (parent id) in the category table. In this way, we can judge the up ...

Posted by jwoo on Sat, 27 Jun 2020 17:13:04 -0700

[spring cloud learning note 8] use and precautions of spring cloud stream

Use of spring cloud stream 1, Introduction to SpringCloud Stream In the actual development, there are various kinds of message processing middleware (MQ), but if you learn all MQ, the learning cost is too high, and the emergence of spring cloud stream can ignore the difference of message middleware ...

Posted by Ziq on Fri, 26 Jun 2020 22:24:45 -0700

Beauty of mybatis source code: 2.8. Parse the objectFactory element and configure the object creation factory of mybatis

Parse the objectFactory element and configure the object creation factory of mybatis In Mybatis, there are many operations to instantiate objects through reflection, such as converting JDBC operation results to specific instance objects based on reflection. For example, the following data are available: MYSQL data: Name Sex (sex) Age panda ...

Posted by gazoo on Fri, 26 Jun 2020 20:48:57 -0700

Beauty of mybatis source code: 2.7. Analyze the plugins element to complete the configuration of mybatis plug-in

Parse the plugins element to complete the configuration of mybatis plug-in > Click to see the usage of the typeAliases element The plug-in mechanism of Mybtis is a very powerful function, which allows us to cut into the inside of Mybatis to perform some of the things we want to do during the operation of Mybatis. Page helper, a popular pagin ...

Posted by mistercoffee on Fri, 26 Jun 2020 20:44:20 -0700

MySQL -- DML (add, delete and modify) language

Preface: to every reader: Hello! My name is Changlon. I'm a runner who runs on the road of programming like you, hoping to change the world and improve your life with programming. First intention of writing article: convenient for review later, convenient for future interview, make more friends, exchan ...

Posted by eflopez on Fri, 26 Jun 2020 01:03:18 -0700

Akka typed - cqrs read write separation mode

Event source and cluster are introduced earlier. Now it's time to discuss CQRS. CQRS is the mode of separation of reading and writing, which is composed of independent writer program and reader program. The specific principle has been introduced in previous blogs. Akka typed should naturally support ...

Posted by dustbuster on Thu, 25 Jun 2020 19:26:59 -0700

Practical AbbitMQ tips that took 3 days to summarize

Previously read articles about RabbitMQ core messaging patterns are based on Java API s, and recently read the official documentation and found that these core messaging patterns can be implemented through Spring AMQP.This paper summarizes the practical techniques of RabbitMQ, including its installation on Windows and Linux, and the Spring A ...

Posted by shamuntoha on Thu, 25 Jun 2020 09:15:41 -0700