Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
commons
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DevOps
commons
Commits
f6ed221d
Commit
f6ed221d
authored
Feb 06, 2018
by
ag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : 删除无意义的定义.
parent
048836e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
TechEnvironment.java
...rc/main/java/cn/quantgroup/tech/util/TechEnvironment.java
+7
-25
No files found.
commons-spring/src/main/java/cn/quantgroup/tech/util/TechEnvironment.java
View file @
f6ed221d
...
@@ -6,36 +6,18 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -6,36 +6,18 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
@Slf4j
public
class
TechEnvironment
{
public
class
TechEnvironment
{
private
volatile
static
TechEnvironment
instance
;
private
boolean
pro
=
false
;
private
String
env
;
private
TechEnvironment
()
{
String
envType
=
Foundation
.
server
().
getEnvType
();
env
=
envType
;
if
(
envType
.
equals
(
"pro"
))
{
pro
=
true
;
}
}
private
static
TechEnvironment
getInstance
()
{
if
(
instance
==
null
)
{
synchronized
(
TechEnvironment
.
class
)
{
if
(
instance
==
null
)
{
instance
=
new
TechEnvironment
();
}
}
}
return
instance
;
}
public
static
String
getEnv
()
{
public
static
String
getEnv
()
{
return
getInstance
().
env
;
return
Foundation
.
server
().
getEnvType
()
;
}
}
/**
* 是否是生产环境
*
* @return true = 是生产环境, false = 不是生产环境
*/
public
static
boolean
isPro
()
{
public
static
boolean
isPro
()
{
return
getInstance
().
pro
;
return
"pro"
.
equalsIgnoreCase
(
getEnv
())
;
}
}
}
}
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