guoyuji
2024-01-23 a6c70be014537e9b5ed48e68edaf3a1a94cb1ac7
north-glass-erp/src/main/java/com/example/erp/common/CacheUtil.java
New file
@@ -0,0 +1,23 @@
package com.example.erp.common;
import com.example.erp.controller.dto.UserDTO;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;
@Component
public class CacheUtil {
    @Cacheable(value="users", key="#id")
    public UserDTO getCacheData(String id){
        return null;
    }
    @Cacheable(value="users", key="#userDTO.getUserId()")
    public UserDTO setCacheData(UserDTO userDTO){
        return userDTO;
    }
}