Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
5c27bce5
Commit
5c27bce5
authored
Jun 05, 2019
by
zhengjie
Browse files
add VisitsInitialization 启动时初始化站点统计
parent
baa9b7c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/monitor/config/VisitsInitialization.java
0 → 100644
View file @
5c27bce5
package
me.zhengjie.modules.monitor.config
;
import
me.zhengjie.modules.monitor.service.VisitsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.stereotype.Component
;
/**
* 初始化站点统计
* @author jie
*/
@Component
public
class
VisitsInitialization
implements
ApplicationRunner
{
@Autowired
private
VisitsService
visitsService
;
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
System
.
out
.
println
(
"--------------- 初始化站点统计,如果存在今日统计则跳过 ---------------"
);
visitsService
.
save
();
System
.
out
.
println
(
"--------------- 初始化站点统计完成 ---------------"
);
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
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