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
Litemall
Commits
c1e96bfe
Commit
c1e96bfe
authored
Jul 23, 2018
by
Menethil
Browse files
修复空值错误
parent
b4d2d076
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-
wx-api
/src/main/java/org/linlinjava/litemall/
wx/service
/SystemInistService.java
→
litemall-
core
/src/main/java/org/linlinjava/litemall/
core/system
/SystemInistService.java
View file @
c1e96bfe
package
org.linlinjava.litemall.
wx.service
;
package
org.linlinjava.litemall.
core.system
;
import
org.linlinjava.litemall.core.
system
.SystemInfoPrinter
;
import
org.linlinjava.litemall.core.
util
.SystemInfoPrinter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
/**
* 系统启动服务,用于检查系统状态及打印系统信息
*/
@Component
public
class
SystemInistService
{
class
SystemInistService
{
private
SystemInistService
systemInistService
;
@Autowired
private
Environment
environment
;
@PostConstruct
p
ublic
void
inist
()
{
p
rivate
void
inist
()
{
systemInistService
=
this
;
SystemInfoPrinter
.
printInfo
(
"
WX-API
初始化信息"
,
getSystemInfo
());
SystemInfoPrinter
.
printInfo
(
"
Litemall
初始化信息"
,
getSystemInfo
());
}
private
Map
<
String
,
String
>
getSystemInfo
()
{
...
...
litemall-core/src/main/java/org/linlinjava/litemall/core/
system
/SystemInfoPrinter.java
→
litemall-core/src/main/java/org/linlinjava/litemall/core/
util
/SystemInfoPrinter.java
View file @
c1e96bfe
package
org.linlinjava.litemall.core.
system
;
package
org.linlinjava.litemall.core.
util
;
import
java.util.Map
;
...
...
@@ -21,6 +21,9 @@ public class SystemInfoPrinter {
private
static
void
setMaxSize
(
Map
<
String
,
String
>
infos
)
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
infos
.
entrySet
())
{
if
(
entry
.
getValue
()
==
null
)
continue
;
int
size
=
entry
.
getKey
().
length
()
+
entry
.
getValue
().
length
();
if
(
size
>
maxSize
)
...
...
@@ -52,6 +55,9 @@ public class SystemInfoPrinter {
}
private
static
void
printLine
(
String
head
,
String
line
)
{
if
(
line
==
null
)
return
;
if
(
head
.
startsWith
(
CREATE_PART_COPPER
))
{
System
.
out
.
println
(
""
);
System
.
out
.
println
(
" [[ "
+
line
+
" ]]"
);
...
...
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