Commit e8ae0d6a by 袁伟铭

1.0.0

parent 08392c1d
package com.zq.api.config; package com.zq.api.config;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zq.api.cache.Cache;
import com.zq.api.cache.CacheManager;
import com.zq.api.dao.SysConfigDao; import com.zq.api.dao.SysConfigDao;
import com.zq.api.utils.NumberUtils; import com.zq.api.utils.NumberUtils;
import com.zq.common.cache.Cache;
import com.zq.common.cache.CacheManager;
import com.zq.common.config.base.SpringContextHolder; import com.zq.common.config.base.SpringContextHolder;
import com.zq.common.entity.SysConfig; import com.zq.common.entity.SysConfig;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.cache; package com.zq.common.cache;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;
...@@ -35,7 +35,7 @@ public interface Cache { ...@@ -35,7 +35,7 @@ public interface Cache {
* @param name * @param name
* @return * @return
*/ */
Cache name(String name); Cache setName(String name);
/** /**
* 根据key获取缓存数据 * 根据key获取缓存数据
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.cache; package com.zq.common.cache;
import com.zq.api.cache.impl.MemorySerializeCache; import com.zq.common.cache.impl.MemorySerializeCache;
import com.zq.api.utils.serializable.SerializerManage; import com.zq.common.cache.serializable.SerializerManage;
import java.util.Collection; import java.util.Collection;
import java.util.Set; import java.util.Set;
...@@ -54,7 +54,7 @@ public class CacheManager { ...@@ -54,7 +54,7 @@ public class CacheManager {
cache = CACHE_MANAGER.get(name); cache = CACHE_MANAGER.get(name);
if (cache == null) { if (cache == null) {
cache = createCache.getCache(); cache = createCache.getCache();
cache.name(name); cache.setName(name);
CACHE_MANAGER.put(name, cache); CACHE_MANAGER.put(name, cache);
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.cache; package com.zq.common.cache;
/** /**
* @author wilmiam * @author wilmiam
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.cache.impl; package com.zq.common.cache.impl;
import com.zq.api.cache.Cache; import com.zq.common.cache.Cache;
import com.zq.api.utils.serializable.Serializer; import com.zq.common.cache.serializable.Serializer;
import com.zq.api.utils.serializable.SerializerManage; import com.zq.common.cache.serializable.SerializerManage;
import java.io.IOException; import java.io.IOException;
import java.util.*; import java.util.*;
...@@ -49,7 +49,7 @@ public class MemorySerializeCache implements Cache { ...@@ -49,7 +49,7 @@ public class MemorySerializeCache implements Cache {
} }
@Override @Override
public MemorySerializeCache name(String name) { public MemorySerializeCache setName(String name) {
this.name = name; this.name = name;
return this; return this;
} }
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.zq.common.cache.serializable;
package com.zq.api.utils.serializable;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -58,7 +57,7 @@ public class JavaSerializer implements Serializer { ...@@ -58,7 +57,7 @@ public class JavaSerializer implements Serializer {
ois = new ObjectInputStream(bais); ois = new ObjectInputStream(bais);
return (T) ois.readObject(); return (T) ois.readObject();
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
log.error("内存反序列化没有找到类型"); log.error("内存反序列化没有找到类型", e);
} finally { } finally {
IoUtil.close(ois); IoUtil.close(ois);
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.utils.serializable; package com.zq.common.cache.serializable;
import java.io.IOException; import java.io.IOException;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package com.zq.api.utils.serializable; package com.zq.common.cache.serializable;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment