Category:Java

  • Tips for using list to map (collectors.tomap) in java8

    Time:2022-6-10

    In actual projects, we often use the list to map operation. In the past, we might use the for loop traversal method. for instance: Define the class first: /Simple object Then there is a list: List<User> userList = Lists. newArrayList( The format we want to convert to map is: A-> Zhang San Past practice (cycle): […]

  • How to design the token between the mobile end and the server end?

    Time:2022-6-10

    Author: be a front end Link:https://www.jianshu.com/p/e07f51c5c8bd There seems to be no detailed explanation on the use of tokens between mobile client and server data transmission on the Internet, which is basically a one-off description. For simply adding a fixed parameter token, it is easy to capture packets. introduce The token is an encrypted string returned […]

  • Java daily exercises, make progress every day (10)

    Time:2022-6-10

    catalogue 1. At run time, the package introduced automatically by the Java interpreter instead of the import statement is (). 2. The following descriptions of collection classes ArrayList, LinkedList and HashMap are incorrect () 3. List and set are the following statements correct? ( ) 4. What are the results of the following programs? 5. […]

  • Spring boot mybatis config and log4j output SQL logs

    Time:2022-6-9

    ​ rely on <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> There are two ways to configure log4j: Be sure to create a new log4j Properties file Configure directly in yamlConfigure in mybatis config ​ Mapper locations still need to be annotated [@mapper] mybatis-config.xml <? xml version=”1.0″ encoding=”UTF-8″ ?> log4j. Properties file #Output the log information with the […]

  • After listening to me talk about the principles of redo log and binlog, the interviewer blush!

    Time:2022-6-9

    I have an old friend. We call him panda. The hairline will touch the back of the head, and the large frame gold wire glasses can’t cover up the dark circles of the eyes, making them particularly “programmers”; The clothes are also very informal. The upper body is a shirt suit, and the lower body […]

  • Instances that use spring @dependson to control the loading order of beans

    Time:2022-6-9

    The bean loading order of the spring container is uncertain, and the spring framework does not stipulate a specific sequence logic specification. However, spring guarantees that if a depends on B (for example, there is a @autowired B variable in beana), B will be loaded before a. But if beana does not directly depend on […]

  • In this way, the polymorphic properties and methods in Java inheritance

    Time:2022-6-8

    Series of articles: In this way, the polymorphic properties and methods in Java inheritance How to gracefully use springboot to return underline format JSON Let’s start with an example: //Parent class The output result is: father I am a child It can be seen that the subclasses have attributes and methods with the same name […]

  • Spring boot 2.5.4 release, 2.2 X officially end the mission!

    Time:2022-6-8

    distanceSpring Boot 2.5.3Less than a month after its release, spring boot 2.5.4 is coming again! The versions released synchronously in this update includeSpring Boot 2.4.10: These two versions fix 35 and 29 bugs, document optimization and dependency upgrade respectively. There are two bug optimized versions. There is nothing more to say. I will inform you […]

  • Java daily exercises, make progress every day (11)

    Time:2022-6-8

    catalogue 1. The correct description of the interface is () 2. The data field in the class is decorated as a private variable with private, so no method can access it. 3. The following class definitions are known: 4. In an exception handling in Java, the statement blocks that can contain multiple statements are (). […]

  • Springboot2.5.2 integrates flowable6.6.0 process engine

    Time:2022-6-7

    1.pom <parent> 2. flowableconfig configuration class package org. fh. config; 3. rewrite the securityutils refactoring process editor to obtain user information package org. flowable. ui. common. security; springboot flowable This work adoptsCC agreement, reprint must indicate the author and the link to this article

  • Springmvc notes (3)

    Time:2022-6-7

    1、 Springmvc interceptor 1.1 quick start step Create an interceptor class to implement the handlerinterceptor interface public class MyInterceptor01 implements HandlerInterceptor { /** *Before the target method is executed * @param request * @param response * @param handler * @return * @throws Exception */ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception […]

  • Java daily exercises, make progress every day (12)

    Time:2022-6-7

    catalogue 1、Which is the return type of the method main()? 2. In Java, the word () is used to indicate the inheritance relationship Use the () keyword to indicate the implementation of the interface. 3. After the following program statements are executed sequentially, the value of B is () 4. What is the output of […]