Category:Java

  • The practical application of Java generics and the realization of stack by array

    Time:2020-9-21

      1. Practical application of generics — Realizing minimum function I designed a generic function to get the minimum value of the array, and the element type of the array should be a subclass of number, and implemented the compatible interface. Public > t min (t [] ARR) {// because number does not have implements […]

  • Detailed explanation of spring’s stringutils trampling record

    Time:2020-9-21

    cause Recently, when I wrote crud, I found that the robustness of paging VO was poor. I changed it for a moment. I didn’t expect that several functions had problems after the change. The original VO key codes are as follows: public class PageVo implements Serializable{ //… omit all irrelevant code Map<String, String> query } […]

  • Troubleshooting of high CPU consumption on line

    Time:2020-9-20

    preface Recently, bloggers encountered some online problems when moving bricks. The general situation is like this. Appearance: the service is down, the CPU consumption is relatively high, which has been over 90%. There must be a little partner who will say the normal operation. Reboot is finished. In fact, it’s OK, but it can’t solve […]

  • Maven packing timestamp problem

    Time:2020-9-20

    When Maven is packaged, the timestamp attribute can be generated to assemble the package name. <version>5.0.${build.time}B</version> <properties> <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> </properties> Turn on the filtering function for the resource file, and the POM variable in the resource file will be automatically replaced during the packaging process. You can get the version number by accessing the properties resource […]

  • Java generating excel template

    Time:2020-9-19

    Java generates excel template, supporting 1. Adding red * before the required fields; 2. Defining the optional value drop-down list vallist3. Defining the name and setting the optional value refname (the name is automatically hidden in SHEET2 and SHEET2) 4. Supporting the setting of multi field linkage indirecttitle5. Defining the hidden column, customizing the column […]

  • Explain in detail that spring boot obtains the version number and compile time stamp in Maven POM

    Time:2020-9-19

    This article first introduces how to obtain the compilation time and version number of a project in springboot, and provides an interface to the outside world. Then it introduces the solution to the time zone error of the new version of Maven. Finally, it introduces two methods of adding the timestamp to the package name. […]

  • Bytecode Foundation

    Time:2020-9-18

    Bytecode Foundation Virtual machine stack and stack frame Hotspot JVM is a stack based virtual machine. Each thread has a virtual machine stack to store stack frames. Each method call is accompanied by the creation and destruction of stack frames. The definition of Java virtual machine stack is shown in the figure When the stack […]

  • Spring transaction propagation mechanism

    Time:2020-9-18

    In @ transfer (propagation = propagation mechanism) 1、 PROPAGATION_ Required (default, blank) a) Supports the current transaction. If there is no current transaction, a new transaction will be created. b) If there is a transaction at present, the transaction is added and merged into one transaction. example: 1) Parent method a (with Transaction) has child […]

  • Analysis of the implementation process of spring regular task polling local database

    Time:2020-9-18

    This article mainly introduces the spring timing task polling local database implementation process analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to What we have to do is very inexplicable. It can be said that it is an […]

  • Data exchange and interaction between front and back end

    Time:2020-9-17

    brief introduction Front end data interaction. Summarize the way of data exchange before and after. No matter whether the project is separated or not, the data interaction between the front and the back is needed, so we should master a variety of data exchange methods to face different business requirements. It is suggested that from […]

  • Java main function

    Time:2020-9-17

    Main function: a special function that can be called by the JVM as the entry point of the program. The definition of the main function is as follows Public: this means that the function has the maximum access rights. Static: represents that the main function already exists with the class loading. Void: the main function […]

  • Example of using args expression in spring AOP

    Time:2020-9-17

    This paper describes the method of using args expression in spring AOP. For your reference, the details are as follows: 1. Configuration <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns=”http://www.springframework.org/schema/beans” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:context=”http://www.springframework.org/schema/context” xmlns:aop=”http://www.springframework.org/schema/aop” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd”> <! — specifies to automatically search bean components and facet classes — > <context:component-scan base-package=”org.crazyit.app.service ,org.crazyit.app.aspect”> <context:include-filter type=”annotation” expression=”org.aspectj.lang.annotation.Aspect” […]