Giter VIP home page Giter VIP logo

spring-boot-student's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-boot-student's Issues

rabbitmq失败没有进行重发

将rabbitmq exchange test-send-award-exchange删掉,调用send,输出日志
MQ消息发送失败,消息重发,消息ID:a75b5579-1c9a-4908-929b-1a02af1a487b,重发次数:0,消息体:{"age":20,"id":1,"name":"12"}
但是没有进一步重发

expireTime 单位错了

  • @param expireTime 锁的过期时间(单位:秒)

// 分布式服务器有时差,这里给1秒的误差值
expires = System.currentTimeMillis() + expireTime + 1;
应该改为:
expires = System.currentTimeMillis() + expireTime * 1000 + 1*1000;
因为currentTimeMillis单位是毫秒,但你l输入参数定义的expireTime是秒的

spring-boot-student-layering-cache pom.xml layering-cache-aspectj jar包依赖问题

   <dependency>
        <groupId>com.xiaolyuh</groupId>
        <artifactId>layering-cache-aspectj</artifactId>
        <version>1.0.0</version>
    </dependency>

this jar can`t downloaded

Failed to execute goal on project spring-boot-student-layering-cache: Could not resolve dependencies for project com.xiaolyuh:spring-boot-student-layering-cache:jar:0.0.1-SNAPSHOT: Could not find artifact com.xiaolyuh:layering-cache-aspectj:jar:1.0.0 in alimaven (http://maven.aliyun.com/nexus/content/groups/public/) -> [Help 1]

so where is the places to download this jar ?

CustomizedRedisCacheManager 父类cacheMap字段和父类updateCacheNames方法不存在?

您好,我没跑起来看,但是看了下您的代码,发现CustomizedRedisCacheManager 这个类里面定义了四个常量,是用来在合适的时机反射父类,获取父类(RedisCacheManager)属性和方法的,但是发现,cacheMap属性和updateCacheNames这个方法,在父类乃至祖类 都是不存在的,是因为版本问题么?也不对啊,刚从git上拉下来的, 版本是完全跟着您定义的版本号走的,难道之前是老版本,后来因为其他模块改成了新版本,而忽略了此处的反射方法的问题?

spring-boot-student-rabbitmq的confirm方法

ack为false时,消息重发,
this.convertAndSend(correlationData.getExchange(), correlationData.getRoutingKey(),
correlationData.getMessage(), correlationData);
实际上
image
没有再次重新发送,是不是我的操作有问题,请指教,谢谢

CustomizedRedisCache依然存在大并发下返回null的问题

public RedisCacheElement get(final RedisCacheKey cacheKey) {

        Assert.notNull(cacheKey, "CacheKey must not be null!");

        // 根据key获取缓存值
        RedisCacheElement redisCacheElement = new RedisCacheElement(cacheKey, fromStoreValue(lookup(cacheKey)));
        // 判断key是否存在
        Boolean exists = (Boolean) redisOperations.execute(new RedisCallback<Boolean>() {

            @Override
            public Boolean doInRedis(RedisConnection connection) throws DataAccessException {
                return connection.exists(cacheKey.getKeyBytes());
            }
        });

        if (!exists.booleanValue()) {
            return null;
        }

        return redisCacheElement;
    }

此处先获取redis的缓存,再判断redis中是否存在缓存key。存在第一步redis获取的缓存为null,此时其他机器向redis缓存数据,然后第二步判断key存在,导致返回了一个value为null的RedisCacheElement对象。

实测确实发生了这种情况。 我觉得判断部分应该修改为

 if (!exists.booleanValue() || redisCacheElement.get() == null) {
        return null;
}

return redisCacheElement;

但是我很奇怪,为什么源码不直接判断redisCacheElement.get()不为null的时候就返回RedisCacheElement对象,却用判断redis是否存在key的方法。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.