Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
24076df5
Commit
24076df5
authored
Mar 06, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码检测错误
parent
30de84de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
AmosJcsApplication.java
...cs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+12
-6
No files found.
amos-boot-system-jcs/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
24076df5
...
...
@@ -17,6 +17,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -53,9 +54,8 @@ public class AmosJcsApplication {
String
port
=
env
.
getProperty
(
"server.port"
);
String
path
=
oConvertUtils
.
getString
(
env
.
getProperty
(
"server.servlet.context-path"
));
GlobalExceptionHandler
.
setAlwaysOk
(
true
);
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-Biz-Boot is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------"
);
String
logs
=
String
.
format
(
"%n----------------------------------------------------------%n Application Amos-Biz-Boot is running! Access URLs:%n Swagger文档: http:// %c : %c %c /doc.html%n----------------------------------------------------------"
,
ip
,
port
,
path
);
logger
.
info
(
logs
);
}
/**
...
...
@@ -71,12 +71,18 @@ public class AmosJcsApplication {
RedisTemplate
redisTemplate
=
context
.
getBean
(
"redisTemplate"
,
RedisTemplate
.
class
);
RedisConnection
redisConnection
=
null
;
try
{
redisConnection
=
redisTemplate
.
getConnectionFactory
().
getConnection
();
redisConnection
.
flushAll
();
RedisConnectionFactory
redisConnectionFactory
=
redisTemplate
.
getConnectionFactory
();
if
(
redisConnectionFactory
!=
null
){
redisConnection
=
redisConnectionFactory
.
getConnection
();
redisConnection
.
flushAll
();
}
}
catch
(
Exception
e
)
{
logger
.
info
(
"删除redis 缓存的key 失败"
);
}
finally
{
redisConnection
.
close
();
if
(
redisConnection
!=
null
){
redisConnection
.
close
();
}
}
}
...
...
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