Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
cloud-backend
Commits
e8ae0d6a
Commit
e8ae0d6a
authored
Jul 14, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.0.0
parent
08392c1d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
19 deletions
+18
-19
api-server/src/main/java/com/zq/api/config/ConfigCache.java
+2
-2
common-utils/src/main/java/com/zq/common/cache/Cache.java
+2
-2
common-utils/src/main/java/com/zq/common/cache/CacheManager.java
+4
-4
common-utils/src/main/java/com/zq/common/cache/ICacheManager.java
+1
-1
common-utils/src/main/java/com/zq/common/cache/impl/MemorySerializeCache.java
+5
-5
common-utils/src/main/java/com/zq/common/cache/serializable/JavaSerializer.java
+2
-3
common-utils/src/main/java/com/zq/common/cache/serializable/Serializer.java
+1
-1
common-utils/src/main/java/com/zq/common/cache/serializable/SerializerManage.java
+1
-1
No files found.
api-server/src/main/java/com/zq/api/config/ConfigCache.java
View file @
e8ae0d6a
package
com
.
zq
.
api
.
config
;
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.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.entity.SysConfig
;
import
lombok.extern.slf4j.Slf4j
;
...
...
api-server/src/main/java/com/zq/api
/cache/Cache.java
→
common-utils/src/main/java/com/zq/common
/cache/Cache.java
View file @
e8ae0d6a
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
com
.
zq
.
api
.
cache
;
package
com
.
zq
.
common
.
cache
;
import
java.util.Collection
;
import
java.util.Set
;
...
...
@@ -35,7 +35,7 @@ public interface Cache {
* @param name
* @return
*/
Cache
n
ame
(
String
name
);
Cache
setN
ame
(
String
name
);
/**
* 根据key获取缓存数据
...
...
api-server/src/main/java/com/zq/api
/cache/CacheManager.java
→
common-utils/src/main/java/com/zq/common
/cache/CacheManager.java
View file @
e8ae0d6a
...
...
@@ -14,11 +14,11 @@
* limitations under the License.
*/
package
com
.
zq
.
api
.
cache
;
package
com
.
zq
.
common
.
cache
;
import
com.zq.
api
.cache.impl.MemorySerializeCache
;
import
com.zq.
api.utils
.serializable.SerializerManage
;
import
com.zq.
common
.cache.impl.MemorySerializeCache
;
import
com.zq.
common.cache
.serializable.SerializerManage
;
import
java.util.Collection
;
import
java.util.Set
;
...
...
@@ -54,7 +54,7 @@ public class CacheManager {
cache
=
CACHE_MANAGER
.
get
(
name
);
if
(
cache
==
null
)
{
cache
=
createCache
.
getCache
();
cache
.
n
ame
(
name
);
cache
.
setN
ame
(
name
);
CACHE_MANAGER
.
put
(
name
,
cache
);
}
}
...
...
api-server/src/main/java/com/zq/api
/cache/ICacheManager.java
→
common-utils/src/main/java/com/zq/common
/cache/ICacheManager.java
View file @
e8ae0d6a
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
com
.
zq
.
api
.
cache
;
package
com
.
zq
.
common
.
cache
;
/**
* @author wilmiam
...
...
api-server/src/main/java/com/zq/api
/cache/impl/MemorySerializeCache.java
→
common-utils/src/main/java/com/zq/common
/cache/impl/MemorySerializeCache.java
View file @
e8ae0d6a
...
...
@@ -14,11 +14,11 @@
* 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.
api.utils
.serializable.Serializer
;
import
com.zq.
api.utils
.serializable.SerializerManage
;
import
com.zq.
common
.cache.Cache
;
import
com.zq.
common.cache
.serializable.Serializer
;
import
com.zq.
common.cache
.serializable.SerializerManage
;
import
java.io.IOException
;
import
java.util.*
;
...
...
@@ -49,7 +49,7 @@ public class MemorySerializeCache implements Cache {
}
@Override
public
MemorySerializeCache
n
ame
(
String
name
)
{
public
MemorySerializeCache
setN
ame
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
...
...
api-server/src/main/java/com/zq/api/utils
/serializable/JavaSerializer.java
→
common-utils/src/main/java/com/zq/common/cache
/serializable/JavaSerializer.java
View file @
e8ae0d6a
...
...
@@ -13,8 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
zq
.
api
.
utils
.
serializable
;
package
com
.
zq
.
common
.
cache
.
serializable
;
import
cn.hutool.core.io.IoUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -58,7 +57,7 @@ public class JavaSerializer implements Serializer {
ois
=
new
ObjectInputStream
(
bais
);
return
(
T
)
ois
.
readObject
();
}
catch
(
ClassNotFoundException
e
)
{
log
.
error
(
"内存反序列化没有找到类型"
);
log
.
error
(
"内存反序列化没有找到类型"
,
e
);
}
finally
{
IoUtil
.
close
(
ois
);
}
...
...
api-server/src/main/java/com/zq/api/utils
/serializable/Serializer.java
→
common-utils/src/main/java/com/zq/common/cache
/serializable/Serializer.java
View file @
e8ae0d6a
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
com
.
zq
.
api
.
utils
.
serializable
;
package
com
.
zq
.
common
.
cache
.
serializable
;
import
java.io.IOException
;
...
...
api-server/src/main/java/com/zq/api/utils
/serializable/SerializerManage.java
→
common-utils/src/main/java/com/zq/common/cache
/serializable/SerializerManage.java
View file @
e8ae0d6a
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
com
.
zq
.
api
.
utils
.
serializable
;
package
com
.
zq
.
common
.
cache
.
serializable
;
import
java.io.IOException
;
import
java.util.HashMap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment