Groovy overload operator
Heavy load for a while, heavy load for a long time.
Recently, I read a book "Groovy in action" to review some of Groovy's syntax features. I am infatuated with the function of this overloaded operator, and I insist on the cool and don't want. Share a Demo.
Because Groovy syntax is slightly different from Java syntax, but it is basic ...
Posted by reddymade on Wed, 08 Jan 2020 06:51:45 -0800
log4j2 source code analysis -- Configuration
Acquisition and initialization of Configuration
LoggerContext is introduced in the previous article. One of the main functions of this class is to convert the structure of the configuration file into Java objects, such as Appender and Logger, according to the configuration file. Configuration is mainly managed by the configuration class. This ...
Posted by borabora12 on Wed, 08 Jan 2020 02:00:15 -0800
How to implement paging query in Akka Persistence
In Akka Persistence, the data is cached in the service memory (state), and the back-end stores some persistent event logs, so it is impossible to use DSL like SQL for paging query. Using Akka Streams and Actor, we can achieve the effect of paging query by coding, and the paging query is still step-by-step parallel
EventSourcedBehavior
CQRS mode ...
Posted by kamurj on Wed, 08 Jan 2020 01:01:33 -0800
SpringBoot and Mybatis configure multiple data sources to connect to multiple databases
SpringBoot and Mybatis configure multiple data sources to connect to multiple databases
Currently Mybatis is the framework for the industry to operate databases, but in many business scenarios, we need to configure multiple data sources in one project to implement business logic.You can also implement multiple data sources in SpringBoot and wr ...
Posted by hanhao on Tue, 07 Jan 2020 19:33:43 -0800
JAVA Architect's Distributed Transaction Solution, Health Project Actual
background
In traditional architectures, you can use spring's @Transactional for declarative or programmatic transaction management, but if multiple data source operations are involved in our code, spring's @Transactional transaction management mechanism will fail, so we can consider using a two-phase commit solution.Let's take mysql as an exa ...
Posted by littlehelp on Tue, 07 Jan 2020 09:31:49 -0800
The tool class and the restart service process of calling Windows system to serve exe program in C#
scene
Use the Windows service program written by C to call in Winform.
Common tool class methods are used to detect whether the service exists or is installed, obtain the service status, start the service, and stop the service.
Take restarting a service in Winform for example.
Note:
Blog home page: https://blog.csdn.net/badao_liumang_qizhi
Pay ...
Posted by marksie1988 on Tue, 07 Jan 2020 06:13:28 -0800
C#Dependent Injection
1. What is Dependent Injection
Formal definition of dependency injection:
Dependency Injection is the process in which a customer class defines only one injection point because it depends on only one interface of a service class and not on a specific service class.In the process of running the program, the client class does not instantiate th ...
Posted by rushdot on Tue, 07 Jan 2020 04:54:38 -0800
How is slf4j bound to a specific log framework
SLF4J is a Simple Logging Facade for Java, which is a facade (appearance) interface or an abstraction of various logging frameworks, such as java.util.logging, logback, log4j, etc. with this product, we can not care about the specific implementation, that is to say, we can switch the logging framework at any time.
The latest version of slf4j 1 ...
Posted by lovelf on Tue, 07 Jan 2020 04:02:05 -0800
Single case analysis
Singleton mode, which should be understood by all java developers, is not necessary for those defective singleton modes. Too low. Here are two kinds of singleton modes.
1, Double check lock
First code:
package com.ayo.singleton;
import java.io.*;
/**
* Double check lock single instance mode
*
* @Authror ayo
* @Date 2020/1/7 14: ...
Posted by adams0423 on Tue, 07 Jan 2020 03:52:47 -0800
The construction of zookeeper single machine and cluster environment
1. Preface
19 years passed pretty fast. As the first one of 20 years, I want to make a simple summary here for the previous year: seriously, 19 years passed pretty miserable. Yes, the conclusion is this sentence. After all, the sense of ceremony must still exist.
Well, let's not talk about it. I hope it's better after 20 years. Save more money ...
Posted by randydg on Tue, 07 Jan 2020 02:51:34 -0800