Zookeeper learning (5): java connection zookeeper
Before adding the connected Semaphore semaphore:
It has been reported that the connection failed, many posts on the Internet said that the firewall of the server where zookeeper is located is not closed, or the jdk version is inconsistent, and so on.
My own analysis of the feeling is as follows:
Although I've put ZooKeeper's ...
Posted by bravo81 on Sat, 02 Feb 2019 13:09:16 -0800
Redis_Jedis, JedisCluster Extended keys Method Implementation
Recently, we have used Java to operate Redis more often, using Jedis component, below is a maven coordinate.
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
<type>jar</type>
<scope>compile< ...
Posted by KCKTechs on Tue, 29 Jan 2019 23:09:15 -0800
Testing Spring Boot with TestNG - Chapter 5: Testing Spring MVC
Testing Spring Boot with TestNG
I prefer to use TestNG for unit and integration testing, so the examples in this paper are based on TestNG.And Spring & Spring Bot's official examples of Testing are mostly based on JUnit, so this article can also provide some useful help to TestNG enthusiasts.
Github address
Chapter List
Chapter 0: Basic Co ...
Posted by cbesh2 on Sun, 06 Jan 2019 02:36:09 -0800
JAVAEE - spring 02: Configuring spring, sts plug-ins, junit integration testing and aop demonstration with annotations
Configuring spring with annotations
1. Steps
1.1 Guide 4+2+spring-aop
1.2 Introducing new namespaces (constraints) for the main configuration file
1.3 Turn on the use of annotations instead of configuration files
1.4 Configuration using annotations in classes
2. Register objects into containers
//<bean name="user" class="cn.itcast.bean.User ...
Posted by y4m4 on Sun, 06 Jan 2019 00:51:09 -0800
How Spring MVC Tests Controller (Using Spring MVC mock Tests)
In spring mvc, the common test cases are the test service layer. Today I will show how to use spring MVC mock to test the controller layer code directly.
1. What is mock testing?
mock testing is a test method that is created with a virtual object for testing some objects that are not easy to construct or acquire.
2. Why use mock t ...
Posted by focus310 on Sat, 05 Jan 2019 10:18:10 -0800
Talk about fail fast of hikari and tomcat jdbc pool
order
This paper mainly studies the fail fast of hikari and tomcat jdbc pool in the case of Midway database hanging.
Experimental code
@Test
public void testDatabaseDownAndUp() throws SQLException, InterruptedException {
LOGGER.info("begin to wait for database down and up");
for(int c=0;c<10;c++){
LOGGER.info("execute:"+(c+1));
...
Posted by alan543 on Tue, 11 Dec 2018 03:18:06 -0800
mybatis Learning Notes of J2EE Series (V) -- mybatis Relational Mapping (One-to-Many Mapping)
This blog is about one-to-many mapping. Take the class as an example.
On the basis of the previous project:
1. Create a new table t_grade in the database and add data:
Establish a one-to-many association between the table and t_student:
Add the field gradeId in table t_student:
2. new class Grade:
package com.test.model;
import j ...
Posted by discorevilo on Sun, 09 Dec 2018 23:48:05 -0800