Guava experience: common methods of copying objects

In Java, the Object class is the parent class of all classes. There are several methods that need override, such as equals,hashCode and toString. Every time I write these methods, I have to make a lot of repetitive judgments. Many class libraries provide tool classes to override these methods, and Gu ...

Posted on Sun, 07 Jun 2020 03:34:59 -0700 by culprit

What's new in java8 - Optional Class

Optional class So far, the most common cause of java application failure is the notorious null pointer exception. Previously, in order to solve the null pointer exception, Google's famous guava project introduced the Optional class. Guava prevents code pollution by detecting null pointer, and encour ...

Posted on Sat, 06 Jun 2020 01:48:40 -0700 by nano

After programmers use IDEA plug-ins, office efficiency increases by 100% (continuous update)

IDEA some good plug-in sharing catalog IDEA some good plug-in sharing Plug in collection CamelCase Translation LiveEdit MarkDown Navigator Jrebel CheckStyle-IDEA Alibaba Java Coding Guidelines Ideavim Maven Helper FindBugs-IDEA GsonFormat Key promoter X .ignore JVM Debuger Memory View CMD Support Batch Scripts Support BashSupport Docker integ ...

Posted on Sun, 24 May 2020 06:03:04 -0700 by eddy666

Springboot 2.x integration ElasticSearch6.x

SpringBoot integration with ElasticSearch is simple, simply by introducing a spring-data-elasticsearch dependency and adding a configuration. Because Elasticsearch has many versions, it is now available 7.5.x, spring-data-elasticsearch is compatible with the corresponding version as follows:   Project structure   pom.xml <?xml ver ...

Posted on Sun, 17 May 2020 11:14:30 -0700 by Houdini

Capture Android screenshots with Espresso and JUnit

By Sergei Munovarov Original text: https://dev.to/serhuz/capturing-screenshots-on-android-with-espresso-and-junit-81f Translation: tommwq http://tommwq.tech/blog/%e7%94%a8espresso%e5%92%8cjunit%e6%8d%95%e6%8d%89android%e5%b1%8f%e5%b9%95%e6%88%aa%e5%9b%be/ Note: in the original android.support The package has been replaced with a new ...

Posted on Fri, 15 May 2020 03:08:12 -0700 by dsp77

AcTiveMQ simple learning 2 - Publish / subscribe to messages

Follow the previous article "ActiveMQ simple learning 1 of JMS": https://my.oschina.net/hanchao/blog/1611447 1, Introduction The publisher / subscriber model supports a specific message topic to publish messages. 0 or N subscribers may be interested in receiving messages from a specific topic. In this model, publishers and subscrib ...

Posted on Thu, 30 Apr 2020 19:36:50 -0700 by yandoo

62. (android Development) upload files using okhttp

To develop android mobile client, you often need to upload files to the server, such as: photos in your mobile phone. Using okhttp would be a good choice. It is easy to use and efficient to run. First, add implementation 'com. Square up. Okhttp3: okhttp: 3.8.1' in the dependencies of app/build.gradle. You can refer to the following code apply p ...

Posted on Thu, 30 Apr 2020 09:25:31 -0700 by danbot26

Rudimentary Study Redis -- spring boot integration Redis + attached project code

1. Environment construction We will continue to use the project used in Redis(4) for beginners Project code Link: https://pan.baidu.com/s/1yiwBs1RZlD6D2jqc-qxUzQ Extraction code: kzz3 1.1 replace pom dependency <dependencies> <!--redis--> <dependency> <groupId>org.springframework.boot&l ...

Posted on Mon, 27 Apr 2020 07:45:39 -0700 by erupt

Integration of spring boot and log4j2

spring-boot-log-log4j2 The project has been synchronized to github at: https://github.com/jiangcaijun/spring-boot-all/tree/master/spring-boot-log-log4j2 Summary: spring-boot Project description Using logj 2 to print and classify logs Related pom dependency <dependency> <!-- exclude fall spring-boot Default log To configure --> ...

Posted on Fri, 03 Apr 2020 18:20:46 -0700 by gardnc

Using bat to call the executable jar file

1, Project requirements 1.maven project 2. There is a properties configuration file. 3. There are internal jar packages 2, The simple thing is to implement an example 1. Placement of project documents   Note: if it is a web project, we will use the jar file as the path in our project WEB-INF/lib.   2.main method code package com.my.tools.run ...

Posted on Wed, 01 Apr 2020 16:44:01 -0700 by senatedc