2019年 01月 17日 - Spring使用RedisTemplate事务的问题处理

    关闭redis开启事务支持

     <bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate">
        <property name="connectionFactory" ref="jedisConnectionFactory" />
        <!-- 开启事务 -->
        <property name="enableTransactionSupport" value="false"></property>
    </bean>
    

    或者

     @Bean
     public StringRedisTemplate redisTransactionTemplate() {
        StringRedisTemplate template = new StringRedisTemplate(redisConnectionFactory());
        template.setEnableTransactionSupport(true);
        return template;
      }
    

    2019年 01月 14日 - junit单元测试中多线程的问题

    当单元测试中存在线程等待情况的处理

    使用join()进行处理

    2019年 01月 14日 - InterruptedException的处理

    InterruptedException的处理

    使用Thread.currentThread().interrupt();

    2018年 12月 30日 - maven构建跳过测试

    需求

    1. 测试类中存在未维护的测试类,无法通过测试
    2. 手动执行命令不想单独添加-Dmaven.test.skip=true或者skipTests