diff --git a/README.md b/README.md
index e3386b13..18ecab36 100644
--- a/README.md
+++ b/README.md
@@ -38,50 +38,28 @@ Hippo-4J 通过对 JDK 线程池增强,以及扩展三方框架底层线程池
- 容器管理 - Tomcat、Jetty、Undertow 容器线程池运行时查看和线程数变更。
- 中间件适配 - Dubbo、Hystrix、RocketMQ、RabbitMQ 等消费线程池运行时数据查看和线程数变更。
-> 开源作者为爱发电不容易,看完有收获,右上角帮忙点个 Star 🤩
-
## 快速开始
对于本地演示目的,请参阅 [Quick start](https://hippo4j.cn/docs/user_docs/user_guide/quick-start)
-演示环境: http://console.hippo4j.cn/index.html
+演示环境: [http://console.hippo4j.cn/index.html](http://console.hippo4j.cn/index.html)
## 联系我

-扫码添加微信,备注:hippo4j,邀您加入群聊。若图片加载不出来,访问 [官网站点](https://hippo4j.cn/docs/user_docs/other/group)
+扫码添加微信,备注:hippo4j,邀您加入群聊。若图片加载不出来,访问 [官网站点](https://hippo4j.cn/docs/user_docs/other/group)。
## 友情链接
-- [[ Sa-Token ]](https://github.com/dromara/sa-token):一个轻量级 java 权限认证框架,让鉴权变得简单、优雅!
+- [[ Sa-Token ]](https://github.com/dromara/sa-token):一个轻量级 java 权限认证框架,让鉴权变得简单、优雅!
- [[ HertzBeat ]](https://github.com/dromara/hertzbeat):易用友好的云监控系统, 无需 Agent, 强大自定义监控能力。
-
- [[ JavaGuide ]](https://github.com/Snailclimb/JavaGuide):一份涵盖大部分 Java 程序员所需要掌握的核心知识。
-
- [[ toBeBetterJavaer ]](https://github.com/itwanger/toBeBetterJavaer):一份通俗易懂、风趣幽默的 Java 学习指南。
-## 开发者
+## 贡献者
-Hippo-4J 获得的成就属于每一位贡献者!如果有意贡献,请参考 [good first issue](https://github.com/opengoofy/hippo4j/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) 或者 [good pro issue](https://github.com/opengoofy/hippo4j/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+pro+issue%22)。
+感谢所有为项目作出贡献的开发者 [[Contributors](https://github.com/opengoofy/hippo4j/graphs/contributors)]。如果有意贡献,参考 [good first issue](https://github.com/opengoofy/hippo4j/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)。
-
-## 谁在使用
-
-如果您正在使用这个项目,可以在 [此处](https://github.com/opengoofy/hippo4j/issues/13) 登记您所在的组织或公司,谢谢。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/SimpleReadWriteLockTest.java b/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/SimpleReadWriteLockTest.java
index 3703de6a..afa70bbd 100644
--- a/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/SimpleReadWriteLockTest.java
+++ b/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/SimpleReadWriteLockTest.java
@@ -17,8 +17,121 @@
package cn.hippo4j.config.toolkit;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import cn.hippo4j.common.toolkit.Assert;
+import org.junit.Test;
+
/**
* SimpleReadWriteLock Test
*/
public class SimpleReadWriteLockTest {
+
+ @Test
+ public void singleTryReadLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ boolean result = simpleReadWriteLock.tryReadLock();
+ Assert.isTrue(result);
+ }
+
+ @Test
+ public void multiTryReadLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryReadLock();
+ boolean result = simpleReadWriteLock.tryReadLock();
+ Assert.isTrue(result);
+ }
+
+ @Test
+ public void singleTryWriteLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ boolean result = simpleReadWriteLock.tryWriteLock();
+ Assert.isTrue(result);
+ }
+ @Test
+ public void multiTryWriteLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryWriteLock();
+ boolean result = simpleReadWriteLock.tryWriteLock();
+ Assert.isTrue(!result);
+ }
+
+ @Test
+ public void tryReadWriteLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryReadLock();
+ boolean result = simpleReadWriteLock.tryWriteLock();
+ Assert.isTrue(!result);
+ }
+
+ @Test
+ public void tryWriteReadLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryWriteLock();
+ boolean result = simpleReadWriteLock.tryReadLock();
+ Assert.isTrue(!result);
+ }
+
+ @Test
+ public void releaseReadLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryReadLock();
+ simpleReadWriteLock.releaseReadLock();
+ boolean result = simpleReadWriteLock.tryWriteLock();
+ Assert.isTrue(result);
+ }
+
+ @Test
+ public void releaseWriteLockTest() {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ simpleReadWriteLock.tryWriteLock();
+ simpleReadWriteLock.releaseWriteLock();
+ boolean result = simpleReadWriteLock.tryReadLock();
+ Assert.isTrue(result);
+ }
+
+ @Test
+ public void multiThreadTryWriteLockTest() throws Exception {
+ SimpleReadWriteLock simpleReadWriteLock = new SimpleReadWriteLock();
+ CountDownLatch countDownLatch = new CountDownLatch(2);
+ new Thread(() -> {
+ try {
+ TimeUnit.SECONDS.sleep(1);
+ while (true) {
+ if (simpleReadWriteLock.tryWriteLock()) {
+ System.out.println(Thread.currentThread() + " -1 get write lock success");
+ TimeUnit.SECONDS.sleep(5);
+ System.out.println(Thread.currentThread() + " -1 execute done");
+ simpleReadWriteLock.releaseWriteLock();
+ countDownLatch.countDown();
+ break;
+ }
+ }
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }).start();
+ new Thread(() -> {
+ try {
+ TimeUnit.SECONDS.sleep(2);
+ while (true) {
+ if (simpleReadWriteLock.tryWriteLock()) {
+ System.out.println(Thread.currentThread() + " -2 get write lock success");
+ TimeUnit.SECONDS.sleep(1);
+ System.out.println(Thread.currentThread() + " -2 execute done");
+ countDownLatch.countDown();
+ break;
+ }
+ }
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ } finally {
+ simpleReadWriteLock.releaseWriteLock();
+ }
+ }).start();
+ countDownLatch.await();
+ Assert.isTrue(simpleReadWriteLock.tryWriteLock());
+ }
+
}
diff --git a/hippo4j-server/pom.xml b/hippo4j-server/pom.xml
index 4b8ee0f2..ebb19a0b 100644
--- a/hippo4j-server/pom.xml
+++ b/hippo4j-server/pom.xml
@@ -21,12 +21,6 @@
${revision}
-
- cn.hippo4j
- hippo4j-discovery
- ${revision}
-
-
javax.xml.bind