ICode9

精准搜索请尝试: 精确搜索
  • Java-在IntegrationTests中禁用带有Redis的Spring会话2019-11-11 21:21:15

    我正在使用带有redis的spring会话,但是我想在进行测试时禁用它.我的课有注释: @ActiveProfiles("integrationtests") 我的application-integrationtests.tml文件包含: spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration

  • java-RedisTemplate keys(String pattern)方法给出空集2019-11-11 05:12:15

    使用org.springframework.data.redis.core.RedisTemplate在Redis服务器中存储数据.我有类似于“ abc @ xyz @ pqr”的模式中的键.想要获取所有以“ abc”开头的字母,并且使用RedisTemplate.keys(String pattern)方法的键如下所示: Set<String> redisKeys = redisTemplate.keys("(ab

  • java-使用spring-data-redis更新Redis中的实体2019-11-10 17:03:55

    我目前正在将Redis(3.2.100)与Spring数据redis(1.8.9)和Jedis连接器一起使用. 当我在现有实体上使用save()函数时,Redis删除我的实体并重新创建该实体. 就我而言,我需要保留此现有实体,并且仅更新该实体的属性. (我有另一个线程同时读取同一实体) 在Spring文档(https://docs.spring

  • java-如何在Redis 1.6.2.上使用Spring缓存管理器2019-10-27 15:19:06

    我们正在使用Spring Cache Manager和spring-data-redis 1.5.2.这些天,我们想将spring-data-redis升级到最新版本,即:1.6.2.RELEASE. 出于某种奇怪的原因,一切都适用于1.5.2,但是升级到1.6.2后, org.springframework.beans.factory.UnsatisfiedDependencyException: Error creat

  • Spring Redis – 主条目到期后索引未删除2019-10-08 02:22:05

    我正在使用Spring Data Repository保存新条目.每个条目我的TTL为10秒. 当我保存带索引的条目时,这是我在Redis中得到的 127.0.0.1:6379> keys * 1) "job:campaignId:aa" 2) "job:a6d6e491-5d75-4fd0-bd8e-71692f6d18be" 3) "job:recipient:dd" 4) "job:a6d6e491-5d75-4fd0-b

  • Spring Data Redis:通过UNIX套接字连接2019-08-28 10:19:06

    我目前正在研究Redis以通过UNIX套接字检索数据. 我已经更新了redis.conf文件来反映这一点,通过定义redis.sock的路径(在我的例子中是/tmp/redis.sock). 使用Spring Data Redis(通过JedisConnectionFactory),我可以看到它有通过TCP连接到Redis的方法(即定义主机名和端口).但是,我没

  • java – spring data redis master slave config2019-07-28 07:19:46

    以下是我的jedis配置 @Bean public JedisConnectionFactory getJedisConnectionFactory() { JedisConnectionFactory jedisConnectionFactory = new JedisConnectionFactory(); jedisConnectionFactory.setUsePool(true); return jedisConnectionFactory; } @Bean pu

  • spring-data-redis的NoSuchMethodError异常2019-07-16 03:18:28

    在将版本系列升级到Kay-RELEASE的spring数据后,开始获得以下异常. Caused by: java.lang.NoSuchMethodError: org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V at org.springframework.data.redis.connection.RedisStandaloneConfiguration.<init>(Redi

  • spring-data-redis redisTemplate Exception2019-07-14 01:18:02

    当我调用get()方法时,发生了异常 这是代码 @Service("RedisService") public class RedisServiceImpl implements RedisService { @Autowired RedisTemplate<String, Long> redisTemplate; @Override public Long get(String key) { return redisTemplate.opsForValue(

  • java – 如何以干净的方式在Spring Data Redis中实现事务?2019-07-08 21:28:40

    我正在关注RetwisJ教程here.在此我不认为Redis交易已实施.例如,在以下函数中,如果中间发生某些异常,则数据将保持不一致状态. 我想知道如何在Spring Data Redis中将以下函数实现为单个事务: public String addUser(String name, String password) { String uid = String.va

  • Spring-data-redis连接池无法正常工作2019-07-06 11:20:17

    这是我使用spring-data-redis的第一个应用程序,我认为我的概念非常好(过去我曾经多次使用过JDBcTemplate和RDBMS-es).这是发生了什么…… 我遇到的问题是,每次我执行get(key)操作(使用ValueOperations对象)时,都会打开和关闭一个连接,这会导致大约1/10秒的延迟(这是服务器代码,所以

  • java – 是否可以定义通用接口并使用Spring @CacheConfig?2019-07-02 15:51:11

    受到this answer的启发,我试图做到以下几点 @NoRepositoryBean public interface CacheableRepository<T, ID extends Serializable> extends JpaRepository<T, ID>, JpaSpecificationExecutor<T>, PagingAndSortingRepository<T, ID> { @Cacheable

  • 过期的键触发事件 – Spring数据Redis2019-06-22 10:05:45

    我正在尝试使用Spring数据redis设置Key expiry事件处理程序,但我无法使其工作.我做了一些研究,但是给了预期的结果.不知道我错过了什么.我想在redis缓存上的密钥到期时记录消息. @Configuration @EnableRedisRepositories public class RedisConfig { @Bean StringRedis

  • 使用Spring Data Redis的Redis Pub / Sub:消息以错误的顺序到达2019-05-19 19:05:38

    我正在尝试使用Redis发布/订阅Spring Data Redis来实现聊天. 我使用RedisTemplate发布消息,如下所示: public class RedisPublisher { @Autowired private RedisTemplate<String, Object> redisTemplate; public void publish(ChannelTopic channelTopic, Object cha

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有