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 […]

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. […]

Driver development 5 blocking IO instances, IO multiplexing

1 blocking IO Process 1 #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <unistd.h> #include <string.h> int main(int argc, char const *argv[]) { char buf[128] = {0}; int a,b; int fd = open(“/dev/myled0”,O_RDWR); if(fd < 0) { printf(“Failed to open device file\ “); exit(-1); } while(1) { memset(buf,0,sizeof(buf)); read(fd,buf,sizeof(buf)); printf(“buf:%s\ […]

SpringBoot integrates Mybatis to implement multi-data source configuration and cross-data source transaction instances

Pom dependency <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.2.RELEASE</version> <relativePath/> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.2.14</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.2.2</version> </dependency> <!– Paging plugin –> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.3.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> </dependencies> application.yml # data source spring: datasource: # master main data […]

Activiti process instances and task allocation

Article directory 1. Process examples 1.1. What is a process instance? 1.2. Associate the actual business with the activiti table (BusinessKey) 1.3. Suspend and activate process instance 1.3.1. All process instances hang 1.3.2. A single process instance hangs 2. Task allocation 2.1. Fixed allocation 2.2. UEL expression distribution 2.2.1. UEL-value method 2.2.2, UEL-method method 2.3. […]

Bugs encountered when integrating the springcloud project: java.lang.IllegalStateException: No instances available for eureka-client-1

When I was learning springcloud recently, I just learned ribbon, performed a load balancing operation, and started a An error occurred when using the eureka-client client, the details are as follows: java.lang.IllegalStateException: No instances available for eureka-client-1 at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:119) ~[spring-cloud-netflix-ribbon-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:99) ~[spring-cloud-netflix-ribbon-2.2.6.RELEASE.jar:2.2.6.RELEASE] at org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor.intercept(LoadBalancerInterceptor.java:56) ~[spring-cloud-commons-3.1.7.jar:3.1.7] at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93) ~[spring-web-5.3.27.jar:5.3.27] at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:77) ~[spring-web-5.3.27.jar:5.3.27] at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.27.jar:5.3.27] […]

Add buttons or links to Angular UI Grid rows to implement click events + multi-select deletion instances

function init() { //Picture Preview self.BtnViewImg = BtnViewImg; } ng-click=”grid.appScope.BtnViewImg(row)” (function () { ‘use strict’; angular.module(‘Nancanl.PR.ProductAPP.DeliveryFile’).config(ListScreenRouteConfig); ListScreenController.$inject = [‘Nancanl.PR.ProductAPP.DeliveryFile.DeliveryFile.service’, ‘$state’, ‘$stateParams’, ‘$rootScope’, ‘$scope’, ‘common.base’, ‘common.services.logger.service’, ‘common.widgets.notificationTile.globalService’, ‘commonService’, ‘common.widgets.busyIndicator.service’, ‘common.services.authentication’, ‘$translate’ ]; function ListScreenController(dataService, $state, $stateParams, $rootScope, $scope, base, loggerService, notificationService, commonService, busyIndicatorService, auth, $translate) { var self = this; var logger, rootstate, messageservice, backendService; activate(); […]