IOC Assembly Bean (Note Mode)

1.Spring's Annotation Assembly Bean First configure the file (applicationContext.xml) to introduce constraints <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework ...

Posted on Sat, 18 Jan 2020 08:50:45 -0800 by myaion

Using Ant in Intellij IDEA for automatic test and generating HTML format test report

Article directory 1, Environmental preparation 1. install Ant 2. configure Ant 3. Test whether Ant is configured successfully 2, Write test code 1. Write test class in src directory 2. Write a test class in the test directory (if not, create a new test and set it to Test Resources Root) 3, Write ...

Posted on Sat, 11 Jan 2020 22:35:03 -0800 by audiomove

gradle application developed by Android (1)

** Brief introduction ** 1. The build.gradle file in the project, the build.gradle file in the root directory and a build.gradle file under each module, such as the newly created project, the root directory comes with one, and the app module is shown as follows: 2. Because I am used to developing under the android menu ...

Posted on Mon, 06 Jan 2020 00:33:34 -0800 by abalfazl

Java share notes: Java Network Programming -- TCP programming

[1] Main steps of TCP programming Client: 1. To create a Socket object, InetAddress class object and int type value are required in the parameter list of the constructor to indicate the IP address and port number of the other party. 2. An object of the subclass of the OutputStream abstract class is returned through the getOutputStream() method ...

Posted on Sun, 05 Jan 2020 23:08:03 -0800 by nonexistence

Advanced Feature Use for Redis

Optimistic Locks and Transactions Use watch to monitor a key; Open transaction for operation; Submit the transaction after the operation is completed; If the watch key changes before committing, the committed transaction will not work; /** * Test transactions and optimistic locks */ @RunWith(SpringRunner.class) @SpringBootTest ...

Posted on Mon, 23 Dec 2019 10:21:11 -0800 by dvdflashbacks

java8 four core function interfaces and reduce method

1. The functional interface provided by java8 can basically meet our task development package com.dw; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.function.*; import java.util.stream.Collectors; public class DemoFunction { /** ======================= ...

Posted on Thu, 19 Dec 2019 09:50:42 -0800 by pillarofautumn

Introduction of jar package in maven project

Introducing jar package into maven project Spring SpringMVC MyBatis Database connection pool, driver package Others (jstl, servlet, junit) Open the pom.xml file of the SSM crud project, add the < dependencies > < dependencies > tag to it, and add dependency in the tag Using maven, so in https://mvnrepository.co ...

Posted on Sun, 15 Dec 2019 08:27:30 -0800 by WDPEjoe

Unit test - spring boot resume unit test

In the Spring project, unit test items need to be established for each layer of controller, service and dao. For different layers, we can use junit and mock in different ways. SpringBoot increases dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test< ...

Posted on Tue, 10 Dec 2019 02:03:45 -0800 by zachrose

Solve the compatibility problem of the support library version: the support package is underlined in red when it is introduced

If the support library version of the referenced third-party library is lower (or inconsistent) than that in app build.gradle, the following problems may occur: all com.android.support libraries must use the exact same version specification(mixing versions can lead to runtime crashes) As shown in the figure below: It is difficult to chang ...

Posted on Mon, 09 Dec 2019 01:28:53 -0800 by Rabioza123

Unit test - establish multithreaded unit test

Unit test (1): spring boot establishes unit test Unit test (2) - Junit4+EasyMock build unit test Unit test (3) - establish multithreaded unit test Junit does not support multithreading. After a unit test case main process runs, other new threads will be GG Smecta. This article mark s a method of multithreading in Junit. Scheme 1 Add dependen ...

Posted on Fri, 06 Dec 2019 08:05:02 -0800 by ShadowIce