Tag:java

  • Long connection, short connection, long polling, short polling and websocket

    Time:2020-7-13

    See a good article, specially reprinted, the original address: long connection, short connection, long polling, short polling, websocket 1、 Short connection and long connection Short connection: TCP connection will be established for each HTTP request, which is easy to manage Long connection: you only need to establish a TCP connection once. Later, HTTP requests reuse […]

  • Design pattern 2: Abstract Factory Pattern

    Time:2020-7-8

    Abstract factory pattern Abstract factory pattern is to create other factories around a super factory. This super factory is also called the factory of other factories. This type of design pattern is a creative pattern, which provides an optimal way to create objects. In the abstract factory pattern, an interface is the factory responsible for […]

  • Design mode 3 — singleton mode

    Time:2020-7-7

    Singleton mode Singleton pattern is one of the simplest design patterns. This type of design pattern is a creative pattern, which provides an optimal way to create objects. This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is created. This class provides a […]

  • Java data encapsulation tree structure code example

    Time:2020-7-7

    This article mainly introduces the Java data encapsulation tree structure code example, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to 1. Entity class @data public class PublishServiceType implements Comparable<PublishServiceType>{ /** * */ private static final […]

  • How to set Java environment variables in Linux system?

    Time:2020-7-6

    This paper introduces how to set Java environment variables under Linux. 1. View the Java installation path 2. View Java execution path 3. Configure Java environment variables 4. Java installation path and execution path 5. Pay attention hereJAVA_ Home must be followed by the bin pathYou must use the,Export outputPay attention to the word export […]

  • Method of converting word / Excel / txt to PDF by Java

    Time:2020-7-6

    introduction: Some time ago, the education system made by the company needs to record the situation and time of users’ learning courses in real time. Therefore, the same is true for some text document courseware besides video courses. The initial plan is to convert HTML files of office related types, and then display the corresponding […]

  • Development and production of Mengchong ecosystem app

    Time:2020-7-3

    Application skills of ThinkPHP + mengpet ecosystem app development (T: i8o, 2853, 296o V Li can)1. Format the file under Runtime: define (‘strip_ RUNTIME_ SPACE’,false);2. Development time does not cache: entry file: define (‘No_ CACHE_ RUNTIME’,true);3. ThinkPHP supports four access modes: A: normal mode B: pathinfo mode C: rewrite mode D: compatibility mode using URL […]

  • Java CPU performance analysis tool code example

    Time:2020-7-3

    This article mainly introduces the Java CPU performance analysis tool code example, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to background Students who have dealt with production problems can basically encounter the sudden slow down […]

  • Design pattern 6 — adapter mode

    Time:2020-7-2

    Adapter mode The adapter pattern serves as a bridge between two incompatible interfaces. This type of design pattern belongs to structural pattern, which combines the functions of two independent interfaces.This pattern involves a single class responsible for adding independent or incompatible interface functions. For example, the card reader acts as an adapter between the memory […]

  • An example analysis of MVC based on Java Web

    Time:2020-7-2

    This paper describes the basic MVC of Java Web implementation. Share with you for your reference. The details are as follows: login.jsp ——Input file for view sectionsuccess.jsp ——Output file of view sectionfailure.jsp ——Output file of view sectionLoginBean.java ——Model partLoginServlet.java ——Controller partweb.xml ——Configuration file of web application The following is a brief introduction: 1、login.jsp The function […]

  • Design mode 7 — bridging mode

    Time:2020-7-1

    Bridging mode Bridge is used to decouple abstraction and implementation, so that they can be changed independently. This type of design pattern belongs to structural pattern, which decouples the abstraction and realization by providing a bridge structure between them. This pattern involves an interface as a bridge, making the function of the entity class independent […]

  • Kafka pure Java integration code

    Time:2020-6-30

    This article mainly introduces the spring pure Java configuration integration Kafka code example, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to KafkaConfig.java package com.niugang.config; import java.util.HashMap; import java.util.Map; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.clients.consumer.OffsetAndMetadata; import org.apache.kafka.clients.consumer.OffsetCommitCallback; import […]