Category:Java

  • @The difference between component and @ configuration as configuration classes

    Time:2021-8-2

    With the fire of spingboot, annotated configuration has been warmly welcomed by everyone. Both @ component and @ configuration can be used as configuration classes. I haven’t thought there is any difference between the two before. Maybe sometimes the program runs differently from what I think. Until you see this article:my.oschina.net/guangshan/blog/1807…。 I realize that @ […]

  • Usage example of property placeholder configurator in spring practice

    Time:2021-8-2

    This article describes the usage of property placeholder configurator in spring practice. Share with you for your reference, as follows: One configuration file <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.springframework.org/schema/beans” xmlns:p=”http://www.springframework.org/schema/p” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd”> <!– Propertyplaceholderconfigurer is a container post processor that reads Property file information and set this information to the data of the spring configuration […]

  • Configuration and use of Maven plug-in generator for reverse engineering of mybatis

    Time:2021-8-1

    Project directory structure POJO: used to store the generated entity class Dao: used to store the generated * mapper.java file Com.hudu.dao: used to store the generated * mapper.xml file Method 1 Configure the generatorconfig.xml file under resources <?xml version=”1.0″ encoding=”UTF-8″?> <!DOCTYPE generatorConfiguration PUBLIC “-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN” “http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd”> <generatorConfiguration> <!– Database driver package location […]

  • 1. Basic structure of Java program

    Time:2021-8-1

    Series articles: 1. Basic structure of Java program 2. Idea, maven, basic use of debugger 3. Java data type About the series of articles, I have moved to the community document and will not be updated in the blog related content. I hope you know. Welcome to subscribe to the documentJava notes~ Welcome to the […]

  • You’re only one interview question away from a high salary

    Time:2021-8-1

    preface After the painful spring and autumn moves, I have also accumulated some facial classics, hoping to help you. Due to the word limit, those who need answers can follow GZH [programmer space] to get the full PDF for free other What is idempotent? Under what circumstances do we need to consider idempotence? How do […]

  • An example of how to easily import and export EXCEL documents using easypoi

    Time:2021-8-1

    Referring to the import and export of Excel, everyone must know that Alibaba’s open source easyexcel, and the GitHub address of the project is: https://github.com/alibaba/easyexcel 。 This project is very active. The purpose of the project is to simplify development and reduce memory consumption. I have also used it in my project, but there are […]

  • Tomcat configuration and custom JRE environment on MAC

    Time:2021-7-31

    download Configuring the Java environmentFirst, go to the Oracle official website to download JDK and configure environment variables, which will not be repeated here. Download TomcatTake tomcat9 as an exampleTomcat download address start-up After downloading, use the command to unzip it to the directory where you stored it firsttar -zxvf apache-tomcat-9.0.41.tar.gz -C ~/Local Enter the […]

  • Why is it not recommended to use equals to judge whether objects are equal?

    Time:2021-7-31

    ​ In this article, we will summarize the difference from A. equals (b), and then make a small analysis of the source code. 1、 When the value is null: 1.a.equals(b), a is null, and a nullpointexception exception is thrown. 2.a.equals(b), a is not null, B is null, and false is returned 3.Objects.equals(a, b)During comparison, if […]

  • CDH + kylin trilogy II: deployment and setup

    Time:2021-7-31

    Welcome to my GitHub https://github.com/zq2599/blog_demos Content: classification and summary of all original articles and supporting source code, involving Java, docker, kubernetes, Devops, etc; Overview of this article This article is the second and last in the CDH + kylin trilogy seriesCDH + kylin trilogy one: preparationThe required machines and files have been prepared and CDH […]

  • Springboot integration httpclient code example

    Time:2021-7-31

    This article mainly introduces the spring boot integration httpclient code example. The example code is introduced in great detail, which has a certain reference value for everyone’s study or work. Friends in need can refer to it Create httpclientconfig configuration class @Configuration @PropertySource(value=”classpath:/properties/httpClient.properties”) public class HttpClientConfig { @Value(“${http.maxTotal}”) private Integer maxTotal; // maximum connection @Value(“${http.defaultMaxPerRoute}”) […]

  • Process diagram of spring cloud building Eureka

    Time:2021-7-30

    This article mainly introduces the process diagram of spring cloud building Eureka. It is introduced in great detail through the example code, which has certain reference value for everyone’s study or work. Friends in need can refer to it Establishment of Eureka server Eureka is the registry of spring cloud, which provides the functions of […]

  • I like an open source class library, which can help you simplify each line of code and recommend it to you

    Time:2021-7-30

    A small partner in the “black iron age” reader group sighed, “hutool‘s open source class library is too powerful. Basically, there should be tool classes in it.” Seriously, I often use hutool at work. It can really help us simplify every line of code, make Java as elegant as a functional language, and make the […]