Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
30cf278b
Commit
30cf278b
authored
Dec 16, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-chat-activity' into 'master'
配置是否使用缓存 See merge request
!2362
parents
aa46a112
9ed12401
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
+15
-1
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+6
-1
ApolloUtils.java
.../java/com/gic/haoban/manage/service/util/ApolloUtils.java
+9
-0
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
30cf278b
...
@@ -171,9 +171,14 @@ public class ImageCombined {
...
@@ -171,9 +171,14 @@ public class ImageCombined {
* 从缓存中加载图像
* 从缓存中加载图像
*/
*/
private
static
BufferedImage
loadImageWithCache
(
String
url
)
{
private
static
BufferedImage
loadImageWithCache
(
String
url
)
{
boolean
useCache
=
ApolloUtils
.
combinedCache
();
if
(!
useCache
)
{
logger
.
info
(
"非缓存加载图片:{}"
,
url
);
return
loadImageWithReader
(
url
);
}
return
imageCache
.
get
(
url
,
key
->
{
return
imageCache
.
get
(
url
,
key
->
{
try
{
try
{
logger
.
info
(
"加载图片buffered:{}
,key:{}"
,
url
,
key
);
logger
.
info
(
"加载图片buffered:{}
"
,
url
);
return
loadImageWithReader
(
key
);
// 使用读取器方法
return
loadImageWithReader
(
key
);
// 使用读取器方法
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取图片异常"
,
e
);
logger
.
error
(
"获取图片异常"
,
e
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ApolloUtils.java
View file @
30cf278b
...
@@ -64,6 +64,15 @@ public class ApolloUtils {
...
@@ -64,6 +64,15 @@ public class ApolloUtils {
return
Integer
.
parseInt
(
combinedFontsType
);
return
Integer
.
parseInt
(
combinedFontsType
);
}
}
public
static
boolean
combinedCache
()
{
Config
config
=
ConfigService
.
getAppConfig
();
String
combinedCache
=
config
.
getProperty
(
"combinedCache"
,
""
);
if
(
StringUtils
.
isBlank
(
combinedCache
))
{
return
false
;
}
return
true
;
}
/**
/**
* 线程池核心线程数
* 线程池核心线程数
* @return
* @return
...
...
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