1.update cache config

main
Gary 9 months ago
parent ac8da9fae3
commit ab06dfb98b

@ -16,7 +16,7 @@ j2cache:
# 缓存中不存在时,运行缓存空对象
allowNullValues: true
redisClient: lettuce
l2CacheOpen: false
l2CacheOpen: true
serialization: json
sync_ttl_to_redis: true
# 一级缓存使用caffeine
@ -31,7 +31,15 @@ j2cache:
# 上面配置的一级缓存为caffeine, 那么这里对一级缓存的配置就必须以这个caffeine开头
caffeine:
properties: caffeine.properties
region:
default: 100000, 365d
journal_query_page: 10000, 365d
journal_id: 2000, 365d
journal_no: 2000, 365d
journal_song_key: 10000, 365d
journal_song_list: 2000, 365d
search_auto_complete: 200000, 365d
user_info: 20000, 365d
---
spring:
cache:

@ -19,7 +19,7 @@ j2cache:
# 缓存中不存在时,运行缓存空对象
allowNullValues: true
redisClient: lettuce
l2CacheOpen: false
l2CacheOpen: true
serialization: json
sync_ttl_to_redis: true
# 一级缓存使用caffeine
@ -34,7 +34,17 @@ j2cache:
# 上面配置的一级缓存为caffeine, 那么这里对一级缓存的配置就必须以这个caffeine开头
caffeine:
properties: caffeine.properties
region:
default: 100000, 365d
journal_query_page: 10000, 365d
journal_id: 2000, 365d
journal_no: 2000, 365d
journal_song_key: 10000, 365d
journal_song_list: 2000, 365d
search_auto_complete: 200000, 365d
user_info: 20000, 365d
#caffeine:
# properties: caffeine.properties
---
spring:
cache:

@ -138,14 +138,14 @@ public class MyController extends BaseController {
return Result.success();
}
@ApiOperation(value = "3.上传个人头像", notes = "图片压缩为70X70 JPEG存入S3桶为indie目录为 user/avatar/")
@ApiOperation(value = "3.上传个人头像", notes = "图片存入S3桶为indie目录为 user/avatar/")
@PostMapping("/avatar")
@GlobalInterceptor(checkAppUserLogin = true)
public Result<String> uploadAvatar(@RequestHeader(value = "Authorization", required = true) String authorization,
@VerifyParam(required = true) MultipartFile file) throws IOException {
UserLoginDto userLoginDto = getUserLoginDto(authorization);
byte[] thumbnail = ScaleFilter.createThumbnail(file.getInputStream(), Constants.LENGTH_512, Constants.LENGTH_512);
byte[] thumbnail = file.getBytes();//.createThumbnail(file.getInputStream(), Constants.LENGTH_512, Constants.LENGTH_512);
String avatarName = userLoginDto.getUserId() + "_" + idWorker.nextId()
+ StringTools.getFileSuffix(file.getOriginalFilename());
String filePath = USER_AVATAR_DIRECTORY + avatarName;

Loading…
Cancel
Save