Skip to content

Commit

Permalink
🏁 v2.5.3.42
Browse files Browse the repository at this point in the history
1. 修复CacheManager注入失败问题。
2. 更新Logo
  • Loading branch information
herodotus-ecosystem committed Jul 23, 2021
1 parent 4ca54a8 commit eb6185f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
Binary file modified documents/readme/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@

package cn.herodotus.eurynome.data.configuration;

import cn.herodotus.eurynome.data.cache.layer.HerodotusCacheManager;
import cn.herodotus.eurynome.data.properties.CacheProperties;
import cn.hutool.extra.spring.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.cache.caffeine.CaffeineCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.redis.cache.RedisCacheManager;

import javax.annotation.PostConstruct;

Expand Down Expand Up @@ -63,8 +70,26 @@
@Import({SpringUtil.class, CaffeineConfiguration.class})
public class DataConfiguration {


@Autowired
private CacheProperties cacheProperties;

@PostConstruct
public void postConstruct() {
log.info("[Eurynome] |- Components [Herodotus Data] Auto Configure.");
}

@Bean
@Primary
public HerodotusCacheManager herodotusCacheManager(CaffeineCacheManager caffeineCacheManager, RedisCacheManager redisCacheManager) {
HerodotusCacheManager herodotusCacheManager = new HerodotusCacheManager();
herodotusCacheManager.setCaffeineCacheManager(caffeineCacheManager);
herodotusCacheManager.setRedisCacheManager(redisCacheManager);
herodotusCacheManager.setDesensitization(cacheProperties.getDesensitization());
herodotusCacheManager.setClearRemoteOnExit(cacheProperties.getClearRemoteOnExit());

log.trace("[Herodotus] |- Bean [Herodotus Cache Manager] Auto Configure.");

return herodotusCacheManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public StringRedisTemplate stringRedisTemplate() {
return stringRedisTemplate;
}


@Bean
@ConditionalOnMissingBean(RedisCacheManager.class)
public RedisCacheManager redisCacheManager() {
Expand Down

0 comments on commit eb6185f

Please sign in to comment.