mirror of
https://gitee.com/incloudcode/yexuejc-springboot.git
synced 2025-07-15 00:07:28 +08:00
新增声明包
This commit is contained in:
parent
ff57ed324f
commit
31cb9c5b55
23
pom.xml
23
pom.xml
@ -53,6 +53,11 @@
|
|||||||
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
|
<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
|
||||||
<thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
|
<thymeleaf-layout-dialect.version>2.3.0</thymeleaf-layout-dialect.version>
|
||||||
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>
|
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>
|
||||||
|
|
||||||
|
<reflectasm.version>1.09</reflectasm.version>
|
||||||
|
<!--dubbo-->
|
||||||
|
<dubbo-spring-boot-starter.version>0.2.0</dubbo-spring-boot-starter.version>
|
||||||
|
<mybatis-plus.version>3.0.3</mybatis-plus.version>
|
||||||
</properties>
|
</properties>
|
||||||
<!-- 声明包版本 继承项目自引入 -->
|
<!-- 声明包版本 继承项目自引入 -->
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -176,6 +181,24 @@
|
|||||||
<classifier>jar-with-dependencies</classifier>
|
<classifier>jar-with-dependencies</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- copy对象 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.esotericsoftware.reflectasm</groupId>
|
||||||
|
<artifactId>reflectasm</artifactId>
|
||||||
|
<version>${reflectasm.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.boot</groupId>
|
||||||
|
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||||
|
<version>${dubbo-spring-boot-starter.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- springboot mybatis-plus-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.yexuejc.springboot.base.test;
|
|||||||
|
|
||||||
import com.yexuejc.base.util.JsonUtil;
|
import com.yexuejc.base.util.JsonUtil;
|
||||||
import com.yexuejc.springboot.base.ApplicationRun;
|
import com.yexuejc.springboot.base.ApplicationRun;
|
||||||
|
import com.yexuejc.springboot.base.autoconfigure.MutiRedisAutoConfiguration;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -25,7 +26,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@SpringBootTest(classes = ApplicationRun.class)
|
@SpringBootTest(classes = ApplicationRun.class)
|
||||||
public class RedisTest {
|
public class RedisTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
@Qualifier(RedisAutoConfiguration.BEAN_REDIS_TEMPLATE0)
|
@Qualifier(MutiRedisAutoConfiguration.BEAN_REDIS_TEMPLATE0)
|
||||||
RedisTemplate redisTemplate;
|
RedisTemplate redisTemplate;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -38,17 +39,20 @@ public class RedisTest {
|
|||||||
redisTemplate.opsForHash().putAll("test.redis", map);
|
redisTemplate.opsForHash().putAll("test.redis", map);
|
||||||
redisTemplate.expire("test.redis", 10, TimeUnit.MINUTES);
|
redisTemplate.expire("test.redis", 10, TimeUnit.MINUTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void get() {
|
public void get() {
|
||||||
Map<String, Object> map = redisTemplate.opsForHash().entries("test.redis");
|
Map<String, Object> map = redisTemplate.opsForHash().entries("test.redis");
|
||||||
System.out.println(JsonUtil.obj2Json(map));
|
System.out.println(JsonUtil.obj2Json(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void update() {
|
public void update() {
|
||||||
Map<String, Object> map = redisTemplate.opsForHash().entries("test.redis");
|
Map<String, Object> map = redisTemplate.opsForHash().entries("test.redis");
|
||||||
redisTemplate.opsForHash().put("test.redis", "q", "123456798");
|
redisTemplate.opsForHash().put("test.redis", "q", "123456798");
|
||||||
System.out.println(JsonUtil.obj2Json(map));
|
System.out.println(JsonUtil.obj2Json(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void del() {
|
public void del() {
|
||||||
Boolean delete = redisTemplate.delete("test.redis");
|
Boolean delete = redisTemplate.delete("test.redis");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user