Spring boot + websocket + netty to push messages
Thank you for your reference- http://bjbsair.com/2020-04-01/tech-info/18392.html
One of the application scenarios of Netty in the project: the message push function can be used to push messages to all users, or to specify a user. The spring boot project is created. The background server uses Netty technology, and the front page uses WebSocket t ...
Posted by jpadie on Thu, 02 Apr 2020 08:24:30 -0700
Lesson 45 - different ways of inheritance
First, thinking
class Child : public Parent{ };
In the code, the colon represents the inheritance relationship, and the Parent represents the inherited class. What is the meaning of public?
Programming experiment:
#include <iostream>
#include <string>
using namespace std;
class Parent
{
};
class Child_ ...
Posted by fiztec on Thu, 02 Apr 2020 03:29:46 -0700
Spring boot auto assembly principle
SpringBootApplication annotation
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class),
@Filter(type = FilterType.CUSTOM, classes = AutoConfigu ...
Posted by theprofession on Thu, 02 Apr 2020 01:45:43 -0700
Domain event publishing based on Spring Data
Domain event publishing is a notification issued by a domain object to let other objects know that they have already processed an operation. Event publishing tries to decouple their own objects from external objects at the code level and reduce technical code intrusion.
1. Manually Publish Events
// Entity Definition
@Entity
public class Depart ...
Posted by kid_c on Thu, 02 Apr 2020 01:07:09 -0700
MIT6.0001 notes, LECTURE 5:Tuples, List (aliasing, mutability, cloning details)
This blog post mainly explains the advanced features of list s, including aliasing, mutability, and cloning.These three attributes require special attention when assigning values.This note and code comes from MIT's public session, Lesson 5. <Introduction to Computer Science and Programming in Python>.
aliasing
For simple data t ...
Posted by Shawn Jetton on Wed, 01 Apr 2020 19:08:10 -0700
Evolution of singleton model, four singleton models
Single example implementation I
A very simple implementation
public class Singleton {
public static Singleton instance = new Singleton();
private Singleton() {
System.out.println("Singleton is create");
}
public static Singleton getSingleton() {
return instance;
}
}
One disadv ...
Posted by gudfry on Wed, 01 Apr 2020 14:49:57 -0700
Spring learning journey (7) comparison of AOP programming based on XML configuration and AspectJ annotation configuration
This blog uses a slightly complex case to compare the differences between AOP programming based on XML configuration and AspectJ annotation configuration.
Related to the introduction of packages and other Spring AOP programming preparation, please refer to other blog posts in the small edition.
Case requirements:
Write a simple calculator to re ...
Posted by Kinneh on Wed, 01 Apr 2020 06:21:33 -0700
[SpringBoot WEB series] summary of asynchronous request knowledge points and usage postures
[SpringBoot WEB series] summary of asynchronous request knowledge points and usage postures
In servlet 3.0, asynchronous request support has been introduced, but in actual business development, there are not many children's shoes that may have used this feature?
As a literacy and usage tutorial for asynchronous requests, this blog post will ...
Posted by greip on Tue, 31 Mar 2020 22:54:18 -0700
Asynchronous application of Generator in ES6
1, introduction
Asynchronous programming is too important for the Javascript language. The execution environment of Javascript language is "single thread". If there is no asynchronous programming, it cannot be used at all. It must be stuck. Now I'll focus on how the Generator function performs asynchronous op ...
Posted by praeses on Tue, 31 Mar 2020 22:29:28 -0700
Python learning notes (13) Python functions (1)
Function foundation
Function: a function is an organized, reusable code segment used to implement a single or associated function.
Function can improve the modularity of application and the reuse rate of code. Python provides many built-in functions, such as print(). You can create your own functions, which are called user-defined functions.
De ...
Posted by Wardy7 on Tue, 31 Mar 2020 21:54:52 -0700