Instances of all methods in the list type (except sort) and explanations (called through help (list))

1. Overview After using help (list) and running it, you can see the following methods: append, clear, copy, count, extend, index, insert, pop, remove, reverse, a total of ten methods. Next, I will give examples one by one. explain. 2. Examples and explanations 1.append: Append object to the end of the list. (Append object to […]

libusb gets the Windows device instance path DevicePath

The interface provided by the libusb.h header file in the current version of libusb (1.0.26) seems to have no way to obtain the device instance path related to the Windows platform. It looks like: \?\usb#vid_04ca & amp;pid_7070#5 & amp;20d34a76 & amp;0 & amp;6#{a5dcbf10-6530-11d2-901f-00c04fb951ed} Only interfaces such as libusb_get_port_numbers are provided to obtain the topology. We […]

Multiple instance problems encountered by SpringBoot integrating scheduled tasks

Talk part That’s right. I improved the logging of scheduled tasks a few days ago. Today I switched servers, deployed one more node, and used nginx load balancing. However, when I checked the logs, I found the following situation. That’s bad, the legendary multi-instance problem has appeared. Today we will talk about how to do […]

Project practice: component scanning (4) – filtering bean instances with RequestMapping annotations

1. ControllerDefinition package com.csdn.mymvc.core; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; //Suppose there is a uri:/fruit/index @Data @NoArgsConstructor @AllArgsConstructor public class ControllerDefinition { private String requestMapping; private Object controllerBean; private Map<String, Method> methodMappingMap = new HashMap<>(); } 2. ComponentScan package com.csdn.mymvc.core; import com.csdn.mymvc.annotation.*; import java.io.File; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import […]

Install redis-cluster three hosts and six instances

1. Prepare the environment: three clean virtual machines and turn off the firewall and selinux 192.168.46.129 redis-1 7001 7002 192.168.46.132 redis-2 7003 7004 192.168.46.135 redis-3 7005 7006 2. Install redis Use the script installation given above or other installation methods. Please change the script installation to the available yum source. 3. Configure different nodes and […]

4 ways for IOC containers to create bean instances

Personal public account: 😕 Can be programmed? Personal Creed: Be content with what you are satisfied with and know what you are not enough to do. Do something or not do something. Both doing and not doing are acceptable Introduction to this article: This article records 4 ways for IOC containers to create bean instances. […]

Solve com.alibaba.fastjson.JSONException: create instance error…

Table of Contents Solve com.alibaba.fastjson.JSONException: create instance error… Reason for error Solution 1. Check the classpath 2. Check the constructor of the class 3. Check constructor parameter types 4. Check Getter and Setter methods 5. Use annotations to specify class names Summarize Resolve com.alibaba.fastjson.JSONException: create instance error… When using the ??com.alibaba.fastjson?? library for JSON serialization […]

[Nacos] How to specify the IP (external network IP) of a business instance to be injected into Nacos

Description of requirements Use Spring Cloud Alibaba to build microservices. The business instance uses the intranet IP to register to the Nacos server by default, so the request will not be successful when crossing a local area network. So how to solve it? Answer: Specify the external network IP to register on Nacos. The following […]