From a16de4fa6e6e2d8b2540353d694991b67ebb5b06 Mon Sep 17 00:00:00 2001
From: life <1733802689@qq.com>
Date: Sun, 29 Oct 2023 22:10:53 +0800
Subject: [PATCH] =?UTF-8?q?redis=E5=90=AF=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 17 +++++++++++------
.../java/com/lc/{test => }/RedisPoolTest.java | 5 ++---
src/main/java/com/lc/Test.java | 13 +++++++++++++
3 files changed, 26 insertions(+), 9 deletions(-)
rename src/main/java/com/lc/{test => }/RedisPoolTest.java (97%)
create mode 100644 src/main/java/com/lc/Test.java
diff --git a/pom.xml b/pom.xml
index c677e54..626cc5e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,17 +36,22 @@
jedis
2.7.2
-
- junit
- junit
- 4.12
- compile
-
maven_repository.org.springframework
spring-test
6.0.6
+
+ junit
+ junit
+ 4.13.2
+ compile
+
+
+ maven_repository.org.springframework.boot
+ spring-boot-autoconfigure
+ 3.0.4
+
diff --git a/src/main/java/com/lc/test/RedisPoolTest.java b/src/main/java/com/lc/RedisPoolTest.java
similarity index 97%
rename from src/main/java/com/lc/test/RedisPoolTest.java
rename to src/main/java/com/lc/RedisPoolTest.java
index 03b2101..2927589 100644
--- a/src/main/java/com/lc/test/RedisPoolTest.java
+++ b/src/main/java/com/lc/RedisPoolTest.java
@@ -1,9 +1,8 @@
-package com.lc.test;
+package com.lc;
import com.lc.Runner.SpringJunitRunner;
import com.lc.redisPool.IRedisPool;
-import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
@@ -24,7 +23,7 @@ public class RedisPoolTest {
private final CountDownLatch cdl=new CountDownLatch(THREAD_NUM);//栅栏
//发令枪 等待一定的时间点 栅栏 等待一定的数量
- @Test
+
public void test() throws Exception {
//初始化连接池
pool.init(9,10000);
diff --git a/src/main/java/com/lc/Test.java b/src/main/java/com/lc/Test.java
new file mode 100644
index 0000000..cbb21a5
--- /dev/null
+++ b/src/main/java/com/lc/Test.java
@@ -0,0 +1,13 @@
+package com.lc;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+import javax.swing.*;
+
+@SpringBootApplication
+public class Test {
+ public static void main(String[] args) {
+ SpringApplication.run(Test.class,args);
+ }
+}