• Springboot source code – bean loading (Part 2)


    Keep going, brother. Don’t go yet~~ In the previous section, we talked about the docreatebean () method. The code: protected Object doCreateBean(String beanName, RootBeanDefinition mbd, @Nullable Object[] args) throws BeanCreationException { BeanWrapper instanceWrapper = null; //Fetch from cache first if (mbd.isSingleton()) { instanceWrapper = this.factoryBeanInstanceCache.remove(beanName); } //Cache not available, create if (instanceWrapper == null) { […]

  • Filebeat collects nginx logs and outputs them to Kafka


    Kafka download decompression wget -c https://archive.apache.org/dist/kafka/2.2.0/kafka_2.12-2.2.0.tgz tar -zxf kafka_2.12-2.2.0.tgz ZK & Kafka key configuration config/zookeeper.properties # the directory where the snapshot is stored. dataDir=/app/kafka_2.12-2.2.0/zkData # the port at which the clients will connect clientPort=2181 config/server.properties #Listening port listeners=PLAINTEXT://:9092 #External connection address advertised.listeners=PLAINTEXT:// #Kafka data storage directory log.dirs=/app/kafka_2.12-2.2.0/kafka-logs-data Start ZK & Kafka #zk ./bin/zookeeper-server-start.sh -daemon config/zookeeper.properties […]

  • Ant Design Vue use menu to select the menu. After refreshing, expand and select by default


    1. Development environment Vue2. Computer system windows10 Professional Edition3. In the process of developing with Ant Design Vue, when we use the menu component, when we select the menu, there is no default expansion and selection. Let me share the methods below.4. Without much nonsense, operate directly: // template <a-menu : open keys = “openkeys” […]

  • ACM learning notes: topological sorting and critical path


    Title: topological sorting and critical path date : 2021-8-15 Tags: ACM, graph theory   Topological sorting For a directed acyclic graph G, all vertices are arranged in a sequence, so that any pair of vertices u and V in the graph, if the edge (U, V) belongs to e (g), then u appears before V […]

  • [data structure balance tree] common fhq_ Treap from entry to mastery (more comments than code Series)


    General fhq_ Treap from entry to mastery (more comments than code Series) The premise is that the author is too tired to write notes. Part of the explanation in the article comes fromOi-wikiAnd according to the code, there are some additions and modifications. This article is only published onBlog GardenAnd knowThe hesitation of the wind, […]

  • How to develop line group pulling software? Small investment and big innovation, teach you to play with automation


    To realize the automatic group pulling of line, it is very troublesome to operate manually every day, so making an automatic tool and freeing the hands of tapping code is the best. First, create a file in the AJ editorBased on Android accessibility service, we can operate the line software interface step by step with […]

  • The best learning path for git version management tools


    Git is a distributed version control software. This paper introduces the typical learning path of the tool and lists the key commands that must be well understood. Independent basic use As a version management tool, in order to keep the revision history, you need to be familiar with the following commands when you don’t consider […]

  • Learn more about the process of Tomcat loading servlets


    Tomcat loading servlet process Someone has lived most of his life without knowing what a servlet is? How does it live in Tomcat? Come on, arrange it~~ Let’s go back to a long time ago, er, the time when springboot started. Find the method servletwebserver applicationcontext#refresh(). Go on, it’s the createwebserver() method in onrefresh() method. […]

  • . net cancellationtokensource detailed explanation of canceling Task Usage


    Original text: https://docs.microsoft.com/en… This paper refines the original text and translates it into Chinese. Cancel does not represent a termination code Don’t take it for granted to rely on the cancel mechanism “terminate a task“, which is impossible! A common misconception is that after canceling a task, the task will automatically stop; But in fact, […]

  • How to use Bert to deal with long text


    1 Preface The maximum sequence length that the pre training model Bert can process is 512. When facing long text (document level), text truncation or sliding window is usually used to make the sequence length of the input model meet the preset value, but this processing method will lead to the loss of global information […]

  • 20 + CSS high frequency practical clips, small skills to improve happiness, you can have Oh


    preface Modify input placeholder style、Multiline text overflow、Hide scroll bar、Modify cursor color、Horizontal vertical center… what a familiar function! Front end children’s shoes will deal with them almost every day. Let’s summarize our CSS happiness clips! Next time you don’t need Baidu or Google, this is your harbor. Click “view source address” to continuously update“ 1. Solve […]

  • The request load balancing of golang HTTP1.1 is forwarded according to http2.0


    Key parameters:TLSNextProto Solution:Setting tlsnextproto to an empty map will not automatically upgrade, which is equivalent to turning off http2.0 client := &http.Client { Transport:&http.Transport{ TLSNextProto: map[string]func(authority string, c *tls.Conn) http.RoundTripper{}, }, } reason:come from https://stackoverflow.com/que…Starting with Go 1.6, the http package has transparent support for the HTTP/2 protocol when using HTTPS. Programs that must disable […]