SpringBoot/Spring uses @ Value for attribute binding (podcast code for wisdom spreading)

Chapter one: springboot uses the ConfigurationProperties annotation to read custom properties (podcast code) Refer to the previous section for some codes, where @ Value is used to read values 1. @ Value read data @Value supports literal quantity, Spring EL expression (#), dollar sign ($), compared with@ ConfigurationProperties , he needs a ...

Posted on Mon, 06 Apr 2020 11:12:59 -0400 by orangehairedboy

DBCP C3PO Druid three database connections

If more than one Connection is needed in a project, if the Connection is always obtained and disconnected, resources will be wasted. If a pool is created to manage the Connection, the Connection can be reused. With the pool, we don't need to create the Connection ourselves, but get the Connection object through the pool ...

Posted on Sat, 04 Apr 2020 20:09:24 -0400 by Inkybro

MongoDB learning (II) visual interface

1, Installation visualization interface 1. Mongo booster installation and configuration 1. Download and install Download address: https://nosqlbooster.com/downloads Click Install directly after downloading: Pop up interface after installation: 2. Click create to create the link: 3. Click the Test Connection test link: 4. After the test is O ...

Posted on Sat, 04 Apr 2020 12:43:39 -0400 by madolia

DBFlow database usage

Summary DBFlow is a powerful, robust and simple ORM framework based on annotation processing. Efficiency follows greenDAO. Based on annotation and apt technology, the operation class is generated during compilation, which is similar to active Android and easy to use. Official DBFlow tutorial Github official address o ...

Posted on Sat, 04 Apr 2020 08:49:01 -0400 by wolves

Comparable interface and Comparator interface

Comparable interface and Comparator interface The Comparable and Comparator interfaces are used when comparing objects or sorting objects in a collection Comparable interface The compatible interface is located under the java.lang package, which needs to be implemented by the object itself, which is equivalent to ...

Posted on Fri, 03 Apr 2020 19:53:45 -0400 by jongretar

Simple understanding of the key points of Spring boot Mokito

[toc] Main 3 notes + easy to use annotation @MockBean is used alone. When spring boot tests, it will replace the native bean managed by spring boot with the annotated bean. In general, this annotation is enough for testing @Mock means that this is a mock object. Use @ InjectMocks to inject it into the corresponding bean @InjectMocks means t ...

Posted on Fri, 03 Apr 2020 04:58:33 -0400 by marco839

Java unit test coding specification

Package structure specification The unit test package structure and source code structure must be consistent, as shown in the following figure:      File naming conventions Unit Test file name is composed of "tested file name + Test", as shown in the figure below      Coding specification Basic unit test class Inherited by ...

Posted on Thu, 02 Apr 2020 20:26:02 -0400 by aussieguy

spring framework learning note 5: spring AOP example

1. guide Pack: Import these two packages in spring   Import another package (download online):   2. Prepare target objects: package service; public class UserServiceImpl implements UserService { @Override public void save() { System.out.println("Save user!"); } @Override public void delete() { System.out. ...

Posted on Thu, 02 Apr 2020 04:01:38 -0400 by MARIOPARTY53

Use of springboot~WebTestClient

When using springboot for development, unit testing is necessary. When you build a spring project, it will generate a test project for us. When your project starts, the test cases are carried out at the same time. When we carry out the integration test of the WEB layer, we can use the WebTestClient tool provided by spring for us, which is very ...

Posted on Mon, 30 Mar 2020 14:33:54 -0400 by nkyoung1

The thinking caused by the same or sequential characters in password verification. md

Thinking about password verification caused by the same or sequential characters [TOC] demand Although users hate this kind of complex password verification, sometimes for the sake of security, our system has to force users to set a higher strength password. For example: it is not allowed to have more than one character with the same or consecu ...

Posted on Wed, 25 Mar 2020 12:06:25 -0400 by kellydigital