Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
messageflow
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
虞诚毅
messageflow
Commits
51394b16
Commit
51394b16
authored
Aug 01, 2018
by
shentao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2018/8/1 消息流8092稳定版
parent
63816bf1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
346 additions
and
336 deletions
+346
-336
pom.xml
+1
-1
src/main/java/com/zhiwei/messageflow/config/MiddlewareConfig.java
+15
-9
src/main/java/com/zhiwei/messageflow/config/MongoConfig.java
+19
-19
src/main/java/com/zhiwei/messageflow/es/service/impl/AutoMarkServiceImpl.java
+3
-3
src/main/java/com/zhiwei/messageflow/es/service/impl/EarlyWarningServiceImpl.java
+20
-20
src/main/java/com/zhiwei/messageflow/es/service/impl/TrackHitAndWarnServiceImpl.java
+229
-227
src/main/java/com/zhiwei/messageflow/util/ESQueryUtil.java
+2
-1
src/main/resources/application.properties
+20
-20
src/main/resources/application.properties.local1
+4
-4
src/main/resources/application.properties.local2
+6
-6
src/main/resources/middleware.properties
+3
-2
src/main/resources/mongo.properties
+23
-23
src/main/resources/redis.properties.6380
+1
-1
No files found.
pom.xml
View file @
51394b16
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
<groupId>
com.zhiwei.middleware
</groupId>
<groupId>
com.zhiwei.middleware
</groupId>
<artifactId>
automaticmark-client
</artifactId>
<artifactId>
automaticmark-client
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/com/zhiwei/messageflow/config/MiddlewareConfig.java
View file @
51394b16
package
com
.
zhiwei
.
messageflow
.
config
;
package
com
.
zhiwei
.
messageflow
.
config
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
java.io.InputStream
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.Properties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.ToString
;
import
lombok.ToString
;
...
@@ -16,12 +14,20 @@ import lombok.ToString;
...
@@ -16,12 +14,20 @@ import lombok.ToString;
*/
*/
@Data
@Data
@ToString
@ToString
@Component
@Configuration
@ConfigurationProperties
(
prefix
=
"middleware"
)
@PropertySource
(
value
=
"classpath:middleware.properties"
)
public
class
MiddlewareConfig
{
public
class
MiddlewareConfig
{
static
{
Properties
conf
=
null
;
try
{
InputStream
is
=
Thread
.
currentThread
().
getContextClassLoader
()
.
getResourceAsStream
(
"middleware.properties"
);
conf
=
new
Properties
();
conf
.
load
(
is
);
is
.
close
();
zookeeperIp
=
conf
.
getProperty
(
"middleware.zookeeperIp"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
static
String
zookeeperIp
;
public
static
String
zookeeperIp
;
}
}
src/main/java/com/zhiwei/messageflow/config/MongoConfig.java
View file @
51394b16
...
@@ -17,25 +17,25 @@ import lombok.ToString;
...
@@ -17,25 +17,25 @@ import lombok.ToString;
@PropertySource
(
value
=
"classpath:mongo.properties"
)
@PropertySource
(
value
=
"classpath:mongo.properties"
)
public
class
MongoConfig
{
public
class
MongoConfig
{
private
String
LocalIP
;
//
private String LocalIP;
private
int
Localport
;
//
private int Localport;
private
String
LocalDBName
;
//
private String LocalDBName;
//
private
String
ServerIP
;
//
private String ServerIP;
private
int
Serverport
;
//
private int Serverport;
private
String
ServerDBName
;
//
private String ServerDBName;
private
String
ServerUsername
;
//
private String ServerUsername;
private
String
ServerPassword
;
//
private String ServerPassword;
private
String
authenticationDatabase
;
//
private String authenticationDatabase;
//
private
String
EventDBName
;
//
private String EventDBName;
private
String
WechatDBName
;
//
private String WechatDBName;
private
String
TestDBName
;
//
private String TestDBName;
//
private
String
weibotagDBName
;
//
private String weibotagDBName;
private
String
mediatagDBName
;
//
private String mediatagDBName;
private
String
TagIP
;
//
private String TagIP;
private
int
Tagport
;
//
private int Tagport;
private
int
connectionsPerHost
;
private
int
connectionsPerHost
;
private
int
threadsAllowedToBlockForConnectionMultiplier
;
private
int
threadsAllowedToBlockForConnectionMultiplier
;
...
...
src/main/java/com/zhiwei/messageflow/es/service/impl/AutoMarkServiceImpl.java
View file @
51394b16
...
@@ -17,9 +17,9 @@ import com.zhiwei.middleware.automaticmark.Service.AutomaticMarkClient;
...
@@ -17,9 +17,9 @@ import com.zhiwei.middleware.automaticmark.Service.AutomaticMarkClient;
@Component
@Component
public
class
AutoMarkServiceImpl
implements
AutoMarkService
{
public
class
AutoMarkServiceImpl
implements
AutoMarkService
{
private
static
AutomaticMarkClient
client
=
AutomaticMarkClient
.
getClient
(
"zookeeper://192.168.0.234:2181"
);
private
static
AutomaticMarkClient
client
=
AutomaticMarkClient
.
getClient
(
MiddlewareConfig
.
zookeeperIp
);
// private static AutomaticMarkClient client =
// AutomaticMarkClient.getClient("zookeeper://192.168.0.203
:2181");
// private static AutomaticMarkClient client = AutomaticMarkClient.getClient("zookeeper://192.168.0.234
:2181");
@Override
@Override
public
void
autoMarkMessages
(
List
<
JSONObject
>
messages
,
Project
project
)
{
public
void
autoMarkMessages
(
List
<
JSONObject
>
messages
,
Project
project
)
{
...
...
src/main/java/com/zhiwei/messageflow/es/service/impl/EarlyWarningServiceImpl.java
View file @
51394b16
...
@@ -36,15 +36,15 @@ public class EarlyWarningServiceImpl implements EarlyWarningService {
...
@@ -36,15 +36,15 @@ public class EarlyWarningServiceImpl implements EarlyWarningService {
*/
*/
long
createAt
=
trackRule
.
getCreateAt
();
long
createAt
=
trackRule
.
getCreateAt
();
long
addDay
=
0
;
long
addDay
=
0
;
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"一天"
))
{
//
if (trackRule.getEarlyWarningTime().equals("一天")) {
addDay
=
24
*
60
*
60
*
1000L
;
//
addDay = 24 * 60 * 60 * 1000L;
}
else
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"二天"
))
{
//
} else if (trackRule.getEarlyWarningTime().equals("二天")) {
addDay
=
2
*
24
*
60
*
60
*
1000L
;
//
addDay = 2 * 24 * 60 * 60 * 1000L;
}
else
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"三天"
))
{
//
} else if (trackRule.getEarlyWarningTime().equals("三天")) {
addDay
=
3
*
24
*
60
*
60
*
1000L
;
//
addDay = 3 * 24 * 60 * 60 * 1000L;
}
//
}
long
confirm
=
createAt
+
addDay
;
long
confirm
=
System
.
currentTimeMillis
()+
1L
;
//
createAt + addDay;
if
(
confirm
<=
System
.
currentTimeMillis
())
{
if
(
confirm
<=
System
.
currentTimeMillis
())
{
// 过期
// 过期
trackRule
.
setWarn
(
true
);
trackRule
.
setWarn
(
true
);
...
@@ -113,17 +113,17 @@ public class EarlyWarningServiceImpl implements EarlyWarningService {
...
@@ -113,17 +113,17 @@ public class EarlyWarningServiceImpl implements EarlyWarningService {
*/
*/
long
createAt
=
trackRule
.
getCreateAt
();
long
createAt
=
trackRule
.
getCreateAt
();
long
addDay
=
0
;
long
addDay
=
0
;
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"一天"
))
{
//
if (trackRule.getEarlyWarningTime().equals("一天")) {
addDay
=
24
*
60
*
60
*
1000L
;
//
addDay = 24 * 60 * 60 * 1000L;
}
else
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"二天"
))
{
//
} else if (trackRule.getEarlyWarningTime().equals("二天")) {
addDay
=
2
*
24
*
60
*
60
*
1000L
;
//
addDay = 2 * 24 * 60 * 60 * 1000L;
}
else
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"三天"
))
{
//
} else if (trackRule.getEarlyWarningTime().equals("三天")) {
addDay
=
3
*
24
*
60
*
60
*
1000L
;
//
addDay = 3 * 24 * 60 * 60 * 1000L;
}
else
if
(
trackRule
.
getEarlyWarningTime
().
equals
(
"一月"
))
{
//
} else if (trackRule.getEarlyWarningTime().equals("一月")) {
addDay
=
30
*
24
*
60
*
60
*
1000L
;
//
addDay = 30 * 24 * 60 * 60 * 1000L;
}
//
}
long
confirm
=
createAt
+
addDay
;
long
confirm
=
System
.
currentTimeMillis
()+
1L
;
//
createAt + addDay;
if
(
confirm
<=
System
.
currentTimeMillis
())
{
if
(
confirm
<=
System
.
currentTimeMillis
())
{
// 过期
// 过期
trackRule
.
setWarn
(
true
);
trackRule
.
setWarn
(
true
);
...
...
src/main/java/com/zhiwei/messageflow/es/service/impl/TrackHitAndWarnServiceImpl.java
View file @
51394b16
...
@@ -368,7 +368,7 @@ public class TrackHitAndWarnServiceImpl implements TrackHitAndWarnService {
...
@@ -368,7 +368,7 @@ public class TrackHitAndWarnServiceImpl implements TrackHitAndWarnService {
// result.put("message", "发送微信预警成功");
// result.put("message", "发送微信预警成功");
// result.put("status", true);
// result.put("status", true);
System
.
out
.
println
(
"发送微信预警成功"
);
System
.
out
.
println
(
"发送微信预警成功"
);
trackRule
.
setWarn
(
tru
e
);
trackRule
.
setWarn
(
fals
e
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
break
;
}
}
...
@@ -497,254 +497,256 @@ public class TrackHitAndWarnServiceImpl implements TrackHitAndWarnService {
...
@@ -497,254 +497,256 @@ public class TrackHitAndWarnServiceImpl implements TrackHitAndWarnService {
@Override
@Override
public
void
WarnWechatNew
(
SearchHits
trackHit
,
String
platformName
,
TrackRule
trackRule
,
String
projectName
)
{
public
void
WarnWechatNew
(
SearchHits
trackHit
,
String
platformName
,
TrackRule
trackRule
,
String
projectName
)
{
for
(
SearchHit
hit
:
trackHit
)
{
if
(
null
!=
trackHit
)
{
String
url
=
""
;
for
(
SearchHit
hit
:
trackHit
)
{
String
title
=
""
;
String
url
=
""
;
String
content
=
""
;
String
title
=
""
;
String
source
=
""
;
String
content
=
""
;
String
time
=
""
;
String
source
=
""
;
String
pt
=
""
;
String
time
=
""
;
int
fensi
=
-
1
;
String
pt
=
""
;
int
fensi
=
-
1
;
String
type
=
hit
.
getType
();
Long
rstime
=
null
!=
hit
.
getSource
().
get
(
"rstime"
)
?
Long
.
valueOf
(
hit
.
getSource
().
get
(
"rstime"
)
+
""
)
String
type
=
hit
.
getType
();
:
null
;
Long
rstime
=
null
!=
hit
.
getSource
().
get
(
"rstime"
)
?
Long
.
valueOf
(
hit
.
getSource
().
get
(
"rstime"
)
+
""
)
if
(
type
.
equals
(
"status"
)
&&
null
!=
rstime
)
{
:
null
;
// 微博
if
(
type
.
equals
(
"status"
)
&&
null
!=
rstime
)
{
url
=
hit
.
getSource
().
get
(
"url"
)
+
""
;
// 微博
title
=
""
;
url
=
hit
.
getSource
().
get
(
"url"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"text"
)
+
""
;
title
=
""
;
source
=
hit
.
getSource
().
get
(
"username"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"text"
)
+
""
;
time
=
hit
.
getSource
().
get
(
"time"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"username"
)
+
""
;
pt
=
"微博"
;
time
=
hit
.
getSource
().
get
(
"time"
)
+
""
;
fensi
=
Integer
.
valueOf
(
hit
.
getSource
().
get
(
"fensi"
)
+
""
);
pt
=
"微博"
;
}
else
if
(
type
.
equals
(
"zhihu"
))
{
fensi
=
Integer
.
valueOf
(
hit
.
getSource
().
get
(
"fensi"
)
+
""
);
// zhihu
}
else
if
(
type
.
equals
(
"zhihu"
))
{
url
=
hit
.
getId
()
+
""
;
// zhihu
title
=
hit
.
getSource
().
get
(
"question_title"
)
+
""
;
url
=
hit
.
getId
()
+
""
;
content
=
hit
.
getSource
().
get
(
"answer_content"
)
+
""
;
title
=
hit
.
getSource
().
get
(
"question_title"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"user_name"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"answer_content"
)
+
""
;
time
=
hit
.
getSource
().
get
(
"created_at"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"user_name"
)
+
""
;
pt
=
"知乎"
;
time
=
hit
.
getSource
().
get
(
"created_at"
)
+
""
;
}
else
if
(
type
.
equals
(
"video"
))
{
pt
=
"知乎"
;
// 视频
}
else
if
(
type
.
equals
(
"video"
))
{
url
=
hit
.
getId
()
+
""
;
// 视频
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
url
=
hit
.
getId
()
+
""
;
content
=
""
;
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"uper"
)
+
""
;
content
=
""
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
source
=
hit
.
getSource
().
get
(
"uper"
)
+
""
;
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
try
{
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
Date
date
=
sdf
.
parse
(
timeout
);
try
{
try
{
// "2017-09-28 20:35:33"
Date
date
=
sdf
.
parse
(
timeout
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
try
{
"yyyy-MM-dd HH:mm:ss"
);
// "2017-09-28 20:35:33"
time
=
sdf
.
format
(
mediadate
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
}
catch
(
Exception
e
)
{
"yyyy-MM-dd HH:mm:ss"
);
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
time
=
sdf
.
format
(
mediadate
);
}
catch
(
Exception
e
)
{
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
}
catch
(
ParseException
e
)
{
pt
=
"视频"
;
e
.
printStackTrace
();
}
else
{
}
// 网媒
pt
=
"视频"
;
String
trueid
=
hit
.
getSource
().
get
(
"id"
)
!=
null
?
String
.
valueOf
(
hit
.
getSource
().
get
(
"id"
))
}
else
{
:
String
.
valueOf
(
hit
.
getId
());
// 网媒
url
=
trueid
;
String
trueid
=
hit
.
getSource
().
get
(
"id"
)
!=
null
?
String
.
valueOf
(
hit
.
getSource
().
get
(
"id"
))
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
:
String
.
valueOf
(
hit
.
getId
());
content
=
hit
.
getSource
().
get
(
"content"
)
+
""
;
url
=
trueid
;
source
=
hit
.
getSource
().
get
(
"source"
)
+
""
;
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
content
=
hit
.
getSource
().
get
(
"content"
)
+
""
;
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
source
=
hit
.
getSource
().
get
(
"source"
)
+
""
;
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
try
{
Date
date
=
sdf
.
parse
(
timeout
);
try
{
try
{
// "2017-09-28 20:35:33"
Date
date
=
sdf
.
parse
(
timeout
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
try
{
"yyyy-MM-dd HH:mm:ss"
);
// "2017-09-28 20:35:33"
time
=
sdf
.
format
(
mediadate
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
}
catch
(
Exception
e
)
{
"yyyy-MM-dd HH:mm:ss"
);
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
time
=
sdf
.
format
(
mediadate
);
}
catch
(
Exception
e
)
{
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
pt
=
platformName
;
}
TemplateData
templateData
=
new
TemplateData
();
if
(
trackRule
.
getRuleType
().
equals
(
"keyWords"
))
{
// 关键词追踪
templateData
.
setWordRule
(
trackRule
.
getRuleExplain
());
}
else
if
(
trackRule
.
getRuleType
().
equals
(
"channel"
))
{
// 渠道追踪
templateData
.
setChannelRule
(
trackRule
.
getRuleExplain
());
}
templateData
.
setUrl
(
url
);
templateData
.
setTitle
(
title
);
templateData
.
setContent
(
content
);
templateData
.
setSource
(
source
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
datetime
;
try
{
datetime
=
sdf
.
parse
(
time
);
templateData
.
setTime
(
datetime
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
templateData
.
setTime
(
new
Date
());
}
templateData
.
setPt
(
pt
);
if
(
fensi
!=
-
1
)
{
templateData
.
setFensi
(
fensi
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
result
=
userMailService
.
sendMailByProject
(
projectName
,
templateData
);
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮件发送成功"
))
{
log
.
info
(
"发送邮件预警成功"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
else
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮箱未获取到"
))
{
log
.
error
(
"发送邮件预警失败,用户获取问题"
);
}
else
{
log
.
error
(
"本次部分条发送失败"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
}
pt
=
platformName
;
}
TemplateData
templateData
=
new
TemplateData
();
if
(
trackRule
.
getRuleType
().
equals
(
"keyWords"
))
{
// 关键词追踪
templateData
.
setWordRule
(
trackRule
.
getRuleExplain
());
}
else
if
(
trackRule
.
getRuleType
().
equals
(
"channel"
))
{
// 渠道追踪
templateData
.
setChannelRule
(
trackRule
.
getRuleExplain
());
}
templateData
.
setUrl
(
url
);
templateData
.
setTitle
(
title
);
templateData
.
setContent
(
content
);
templateData
.
setSource
(
source
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
datetime
;
try
{
datetime
=
sdf
.
parse
(
time
);
templateData
.
setTime
(
datetime
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
templateData
.
setTime
(
new
Date
());
}
templateData
.
setPt
(
pt
);
if
(
fensi
!=
-
1
)
{
templateData
.
setFensi
(
fensi
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
result
=
userMailService
.
sendMailByProject
(
projectName
,
templateData
);
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮件发送成功"
))
{
log
.
info
(
"发送邮件预警成功"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
else
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮箱未获取到"
))
{
log
.
error
(
"发送邮件预警失败,用户获取问题"
);
}
else
{
log
.
error
(
"本次部分条发送失败"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
}
}
}
}
}
@Override
@Override
public
void
WarnEmailNew
(
SearchHits
trackHit
,
String
platformName
,
TrackRule
trackRule
,
String
projectName
)
{
public
void
WarnEmailNew
(
SearchHits
trackHit
,
String
platformName
,
TrackRule
trackRule
,
String
projectName
)
{
for
(
SearchHit
hit
:
trackHit
)
{
if
(
null
!=
trackHit
)
{
String
url
=
""
;
for
(
SearchHit
hit
:
trackHit
)
{
String
title
=
""
;
String
url
=
""
;
String
content
=
""
;
String
title
=
""
;
String
source
=
""
;
String
content
=
""
;
String
time
=
""
;
String
source
=
""
;
String
pt
=
""
;
String
time
=
""
;
int
fensi
=
-
1
;
String
pt
=
""
;
int
fensi
=
-
1
;
String
type
=
hit
.
getType
();
Long
rstime
=
null
!=
hit
.
getSource
().
get
(
"rstime"
)
?
Long
.
valueOf
(
hit
.
getSource
().
get
(
"rstime"
)
+
""
)
String
type
=
hit
.
getType
();
:
null
;
Long
rstime
=
null
!=
hit
.
getSource
().
get
(
"rstime"
)
?
Long
.
valueOf
(
hit
.
getSource
().
get
(
"rstime"
)
+
""
)
if
(
type
.
equals
(
"status"
)
&&
null
!=
rstime
)
{
:
null
;
// 微博
if
(
type
.
equals
(
"status"
)
&&
null
!=
rstime
)
{
url
=
hit
.
getSource
().
get
(
"url"
)
+
""
;
// 微博
title
=
""
;
url
=
hit
.
getSource
().
get
(
"url"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"text"
)
+
""
;
title
=
""
;
source
=
hit
.
getSource
().
get
(
"username"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"text"
)
+
""
;
time
=
hit
.
getSource
().
get
(
"time"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"username"
)
+
""
;
pt
=
"微博"
;
time
=
hit
.
getSource
().
get
(
"time"
)
+
""
;
fensi
=
Integer
.
valueOf
(
hit
.
getSource
().
get
(
"fensi"
)
+
""
);
pt
=
"微博"
;
}
else
if
(
type
.
equals
(
"zhihu"
))
{
fensi
=
Integer
.
valueOf
(
hit
.
getSource
().
get
(
"fensi"
)
+
""
);
// zhihu
}
else
if
(
type
.
equals
(
"zhihu"
))
{
url
=
hit
.
getId
()
+
""
;
// zhihu
title
=
hit
.
getSource
().
get
(
"question_title"
)
+
""
;
url
=
hit
.
getId
()
+
""
;
content
=
hit
.
getSource
().
get
(
"answer_content"
)
+
""
;
title
=
hit
.
getSource
().
get
(
"question_title"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"user_name"
)
+
""
;
content
=
hit
.
getSource
().
get
(
"answer_content"
)
+
""
;
time
=
hit
.
getSource
().
get
(
"created_at"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"user_name"
)
+
""
;
pt
=
"知乎"
;
time
=
hit
.
getSource
().
get
(
"created_at"
)
+
""
;
}
else
if
(
type
.
equals
(
"video"
))
{
pt
=
"知乎"
;
// 视频
}
else
if
(
type
.
equals
(
"video"
))
{
url
=
hit
.
getId
()
+
""
;
// 视频
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
url
=
hit
.
getId
()
+
""
;
content
=
""
;
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
source
=
hit
.
getSource
().
get
(
"uper"
)
+
""
;
content
=
""
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
source
=
hit
.
getSource
().
get
(
"uper"
)
+
""
;
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
try
{
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
Date
date
=
sdf
.
parse
(
timeout
);
try
{
try
{
// "2017-09-28 20:35:33"
Date
date
=
sdf
.
parse
(
timeout
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
try
{
"yyyy-MM-dd HH:mm:ss"
);
// "2017-09-28 20:35:33"
time
=
sdf
.
format
(
mediadate
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
}
catch
(
Exception
e
)
{
"yyyy-MM-dd HH:mm:ss"
);
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
time
=
sdf
.
format
(
mediadate
);
}
catch
(
Exception
e
)
{
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
}
catch
(
ParseException
e
)
{
pt
=
"视频"
;
e
.
printStackTrace
();
}
else
{
}
// 网媒
pt
=
"视频"
;
String
trueid
=
hit
.
getSource
().
get
(
"id"
)
!=
null
?
String
.
valueOf
(
hit
.
getSource
().
get
(
"id"
))
}
else
{
:
String
.
valueOf
(
hit
.
getId
());
// 网媒
url
=
trueid
;
String
trueid
=
hit
.
getSource
().
get
(
"id"
)
!=
null
?
String
.
valueOf
(
hit
.
getSource
().
get
(
"id"
))
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
:
String
.
valueOf
(
hit
.
getId
());
content
=
hit
.
getSource
().
get
(
"content"
)
+
""
;
url
=
trueid
;
source
=
hit
.
getSource
().
get
(
"source"
)
+
""
;
title
=
hit
.
getSource
().
get
(
"title"
)
+
""
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
content
=
hit
.
getSource
().
get
(
"content"
)
+
""
;
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
source
=
hit
.
getSource
().
get
(
"source"
)
+
""
;
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
timein
=
String
.
valueOf
(
hit
.
getSource
().
get
(
"time"
));
String
timeout
=
timein
.
replaceAll
(
"T"
,
" "
);
try
{
Date
date
=
sdf
.
parse
(
timeout
);
try
{
try
{
// "2017-09-28 20:35:33"
Date
date
=
sdf
.
parse
(
timeout
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
try
{
"yyyy-MM-dd HH:mm:ss"
);
// "2017-09-28 20:35:33"
time
=
sdf
.
format
(
mediadate
);
Date
mediadate
=
TimeUtil
.
parseTime
(
TimeUtil
.
formatTime
(
TimeUtil
.
addTimeHour
(
date
,
8
)),
}
catch
(
Exception
e
)
{
"yyyy-MM-dd HH:mm:ss"
);
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
time
=
sdf
.
format
(
mediadate
);
}
catch
(
Exception
e
)
{
time
=
sdf
.
format
(
System
.
currentTimeMillis
());
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
pt
=
platformName
;
}
TemplateData
templateData
=
new
TemplateData
();
if
(
trackRule
.
getRuleType
().
equals
(
"keyWords"
))
{
// 关键词追踪
templateData
.
setWordRule
(
trackRule
.
getRuleExplain
());
}
else
if
(
trackRule
.
getRuleType
().
equals
(
"channel"
))
{
// 渠道追踪
templateData
.
setChannelRule
(
trackRule
.
getRuleExplain
());
}
templateData
.
setUrl
(
url
);
templateData
.
setTitle
(
title
);
templateData
.
setContent
(
content
);
templateData
.
setSource
(
source
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
datetime
;
try
{
datetime
=
sdf
.
parse
(
time
);
templateData
.
setTime
(
datetime
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
templateData
.
setTime
(
new
Date
());
}
templateData
.
setPt
(
pt
);
if
(
fensi
!=
-
1
)
{
templateData
.
setFensi
(
fensi
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
result
=
userMailService
.
sendMailByProject
(
projectName
,
templateData
);
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮件发送成功"
))
{
log
.
info
(
"发送邮件预警成功"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
else
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮箱未获取到"
))
{
log
.
error
(
"发送邮件预警失败,用户获取问题"
);
}
else
{
log
.
error
(
"本次部分条发送失败"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
}
pt
=
platformName
;
}
TemplateData
templateData
=
new
TemplateData
();
if
(
trackRule
.
getRuleType
().
equals
(
"keyWords"
))
{
// 关键词追踪
templateData
.
setWordRule
(
trackRule
.
getRuleExplain
());
}
else
if
(
trackRule
.
getRuleType
().
equals
(
"channel"
))
{
// 渠道追踪
templateData
.
setChannelRule
(
trackRule
.
getRuleExplain
());
}
templateData
.
setUrl
(
url
);
templateData
.
setTitle
(
title
);
templateData
.
setContent
(
content
);
templateData
.
setSource
(
source
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
);
Date
datetime
;
try
{
datetime
=
sdf
.
parse
(
time
);
templateData
.
setTime
(
datetime
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
templateData
.
setTime
(
new
Date
());
}
templateData
.
setPt
(
pt
);
if
(
fensi
!=
-
1
)
{
templateData
.
setFensi
(
fensi
);
}
Map
<
String
,
Object
>
result
=
new
HashMap
<
String
,
Object
>();
result
=
userMailService
.
sendMailByProject
(
projectName
,
templateData
);
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮件发送成功"
))
{
log
.
info
(
"发送邮件预警成功"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
else
if
((
result
.
get
(
"message"
)
+
""
).
equals
(
"用户组邮箱未获取到"
))
{
log
.
error
(
"发送邮件预警失败,用户获取问题"
);
}
else
{
log
.
error
(
"本次部分条发送失败"
);
trackRule
.
setWarn
(
true
);
trackRuleDao
.
updateTrackrule
(
trackRule
.
get_id
());
break
;
}
}
}
}
}
}
}
}
src/main/java/com/zhiwei/messageflow/util/ESQueryUtil.java
View file @
51394b16
...
@@ -383,7 +383,8 @@ public class ESQueryUtil {
...
@@ -383,7 +383,8 @@ public class ESQueryUtil {
fields
.
add
(
"title"
);
fields
.
add
(
"title"
);
}
}
}
}
if
((
matchFields
.
equals
(
"全文"
)
||
matchFields
.
equals
(
"标题+全文"
)
||
matchFields
.
equals
(
""
))&&!
ptList
.
contains
(
"video"
))
{
if
(
matchFields
.
equals
(
"全文"
)
||
matchFields
.
equals
(
"标题+全文"
)
||
matchFields
.
equals
(
""
))
{
// if ((matchFields.equals("全文") || matchFields.equals("标题+全文") || matchFields.equals(""))&&!ptList.contains("video")) {
if
(!
fields
.
contains
(
"content"
))
{
if
(!
fields
.
contains
(
"content"
))
{
fields
.
add
(
"content"
);
fields
.
add
(
"content"
);
}
}
...
...
src/main/resources/application.properties
View file @
51394b16
##\u
009C\u008D\u008A端
uri
##\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF
uri
#spring.data.mongodb.uri=115.236.59.91:27017
#spring.data.mongodb.uri=115.236.59.91:27017
#\u5185\u7F6Etomcat\u7AEF\u53E3\u53F7
#\u5185\u7F6Etomcat\u7AEF\u53E3\u53F7
server.port
=
809
1
server.port
=
809
2
#\u
009C\u008D\u008A端\u0095\u008
D\u0093
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
spring.data.mongodb.primary.database
=
qbjcPhoenix
spring.data.mongodb.primary.database
=
qbjcPhoenix
#\u
009C\u008D\u008A
ip
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
ip
spring.data.mongodb.primary.host
=
192.168.0.101
spring.data.mongodb.primary.host
=
192.168.0.101
#\u
009C\u008D\u008A
port
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
port
spring.data.mongodb.primary.port
=
27017
spring.data.mongodb.primary.port
=
30000
spring.data.mongodb.primary.username
=
stno
spring.data.mongodb.primary.username
=
stno
...
@@ -17,12 +17,12 @@ spring.data.mongodb.primary.password=stno1q2w3e4r
...
@@ -17,12 +17,12 @@ spring.data.mongodb.primary.password=stno1q2w3e4r
spring.data.mongodb.primary.authenticationDatabase
=
admin
spring.data.mongodb.primary.authenticationDatabase
=
admin
#\u
009C\u008D\u008A端\u0095\u008
D\u0093
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
spring.data.mongodb.secondary.database
=
eventMuseum
spring.data.mongodb.secondary.database
=
eventMuseum
#\u
009C\u008D\u008A
ip
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
ip
spring.data.mongodb.secondary.host
=
192.168.0.101
spring.data.mongodb.secondary.host
=
192.168.0.101
#\u
009C\u008D\u008A
port
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
port
spring.data.mongodb.secondary.port
=
27017
spring.data.mongodb.secondary.port
=
30000
spring.data.mongodb.secondary.username
=
stno
spring.data.mongodb.secondary.username
=
stno
...
@@ -30,12 +30,12 @@ spring.data.mongodb.secondary.password=stno1q2w3e4r
...
@@ -30,12 +30,12 @@ spring.data.mongodb.secondary.password=stno1q2w3e4r
spring.data.mongodb.secondary.authenticationDatabase
=
admin
spring.data.mongodb.secondary.authenticationDatabase
=
admin
#\u
009C\u008D\u008A端\u0095\u008
D\u0093
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
spring.data.mongodb.thirdary.database
=
WechatPublic
spring.data.mongodb.thirdary.database
=
WechatPublic
#\u
009C\u008D\u008A
ip
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
ip
spring.data.mongodb.thirdary.host
=
192.168.0.101
spring.data.mongodb.thirdary.host
=
192.168.0.101
#\u
009C\u008D\u008A
port
#\u
FFFD\u009C\u008D\uFFFD\u008A\uFFFD
port
spring.data.mongodb.thirdary.port
=
27017
spring.data.mongodb.thirdary.port
=
30000
spring.data.mongodb.thirdary.username
=
stno
spring.data.mongodb.thirdary.username
=
stno
...
@@ -64,21 +64,21 @@ spring.data.mongodb.thirdary.authenticationDatabase=admin
...
@@ -64,21 +64,21 @@ spring.data.mongodb.thirdary.authenticationDatabase=admin
#spring.data.mongodb.option.heartbeat-frequency=10000
#spring.data.mongodb.option.heartbeat-frequency=10000
#spring.data.mongodb.option.local-threshold=15
#spring.data.mongodb.option.local-threshold=15
##\u
009C\u009C
ip
##\u
FFFD\u009C\uFFFD\uFFFD\u009C\uFFFD
ip
#spring.data.mongodb.host=192.168.0.241
#spring.data.mongodb.host=192.168.0.241
##\u
009C\u009C
port
##\u
FFFD\u009C\uFFFD\uFFFD\u009C\uFFFD
port
#spring.data.mongodb.port=27017
#spring.data.mongodb.port=27017
##\u
009C\u009C\u0095\u008
D\u0093
##\u
FFFD\u009C\uFFFD\uFFFD\u009C\uFFFD\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
#spring.data.mongodb.database=qbjcPhoenix
#spring.data.mongodb.database=qbjcPhoenix
#\u
0085\u0096\u0095\u008
D\u0093
#\u
FFFD\u0085\uFFFD\uFFFD\u0096\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
#spring.data.mongodb.database=eventMuseum
#spring.data.mongodb.database=eventMuseum
#spring.data.mongodb.database=WechatPublic
#spring.data.mongodb.database=WechatPublic
#tag\u
0094
uri
#tag\u
FFFD\u0094\uFFFD
uri
#spring.data.mongodb.uri=1.119.44.206:30000
#spring.data.mongodb.uri=1.119.44.206:30000
#spring.data.mongodb.uri=192.168.0.245:27017
#spring.data.mongodb.uri=192.168.0.245:27017
#tag\u
0095\u008
D\u0093
#tag\u
FFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFF
D\u0093
#spring.data.mongodb.database=Testqbjc
#spring.data.mongodb.database=Testqbjc
#spring.data.mongodb.database=weibotag
#spring.data.mongodb.database=weibotag
...
...
src/main/resources/application.properties.local1
View file @
51394b16
...
@@ -16,9 +16,9 @@ spring.data.mongodb.primary.port=27017
...
@@ -16,9 +16,9 @@ spring.data.mongodb.primary.port=27017
#服务端数据库
#服务端数据库
spring.data.mongodb.secondary.database=eventMuseum
spring.data.mongodb.secondary.database=eventMuseum
#服务ip
#服务ip
spring.data.mongodb.secondary.host=
115.236.59.91
spring.data.mongodb.secondary.host=
202.107.192.94
#服务port
#服务port
spring.data.mongodb.secondary.port=
27017
spring.data.mongodb.secondary.port=
30000
spring.data.mongodb.secondary.username=stno
spring.data.mongodb.secondary.username=stno
...
@@ -29,9 +29,9 @@ spring.data.mongodb.secondary.authenticationDatabase=admin
...
@@ -29,9 +29,9 @@ spring.data.mongodb.secondary.authenticationDatabase=admin
#服务端数据库
#服务端数据库
spring.data.mongodb.thirdary.database=WechatPublic
spring.data.mongodb.thirdary.database=WechatPublic
#服务ip
#服务ip
spring.data.mongodb.thirdary.host=
115.236.59.91
spring.data.mongodb.thirdary.host=
202.107.192.94
#服务port
#服务port
spring.data.mongodb.thirdary.port=
27017
spring.data.mongodb.thirdary.port=
30000
spring.data.mongodb.thirdary.username=stno
spring.data.mongodb.thirdary.username=stno
...
...
src/main/resources/application.properties.local2
View file @
51394b16
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
#服务端数据库
#服务端数据库
spring.data.mongodb.primary.database=qbjcPhoenix
spring.data.mongodb.primary.database=qbjcPhoenix
#服务ip
#服务ip
spring.data.mongodb.primary.host=
115.236.59.91
spring.data.mongodb.primary.host=
202.107.192.94
#服务port
#服务port
spring.data.mongodb.primary.port=
27017
spring.data.mongodb.primary.port=
30000
spring.data.mongodb.primary.username=stno
spring.data.mongodb.primary.username=stno
...
@@ -16,9 +16,9 @@ spring.data.mongodb.primary.authenticationDatabase=admin
...
@@ -16,9 +16,9 @@ spring.data.mongodb.primary.authenticationDatabase=admin
#服务端数据库
#服务端数据库
spring.data.mongodb.secondary.database=eventMuseum
spring.data.mongodb.secondary.database=eventMuseum
#服务ip
#服务ip
spring.data.mongodb.secondary.host=
115.236.59.91
spring.data.mongodb.secondary.host=
202.107.192.94
#服务port
#服务port
spring.data.mongodb.secondary.port=
27017
spring.data.mongodb.secondary.port=
30000
spring.data.mongodb.secondary.username=stno
spring.data.mongodb.secondary.username=stno
...
@@ -29,9 +29,9 @@ spring.data.mongodb.secondary.authenticationDatabase=admin
...
@@ -29,9 +29,9 @@ spring.data.mongodb.secondary.authenticationDatabase=admin
#服务端数据库
#服务端数据库
spring.data.mongodb.thirdary.database=WechatPublic
spring.data.mongodb.thirdary.database=WechatPublic
#服务ip
#服务ip
spring.data.mongodb.thirdary.host=
115.236.59.91
spring.data.mongodb.thirdary.host=
202.107.192.94
#服务port
#服务port
spring.data.mongodb.thirdary.port=
27017
spring.data.mongodb.thirdary.port=
30000
spring.data.mongodb.thirdary.username=stno
spring.data.mongodb.thirdary.username=stno
...
...
src/main/resources/middleware.properties
View file @
51394b16
middleware.zookeeperIp
=
zookeeper://192.168.0.234:2181
#middleware.zookeeperIp=zookeeper://192.168.0.234:2181
\ No newline at end of file
middleware.zookeeperIp
=
zookeeper://192.168.0.203:2181
\ No newline at end of file
src/main/resources/mongo.properties
View file @
51394b16
...
@@ -3,29 +3,29 @@
...
@@ -3,29 +3,29 @@
#mongo.Localport = 27017
#mongo.Localport = 27017
#mongo.LocalIP = 115.236.59.91
#mongo.LocalIP = 115.236.59.91
mongo.LocalIP
=
192.168.0.101
#
mongo.LocalIP = 192.168.0.101
mongo.LocalDBName
=
qbjcPhoenix
#
mongo.LocalDBName = qbjcPhoenix
mongo.Localport
=
27017
#
mongo.Localport = 27017
#
mongo.ServerIP
=
192.168.0.101
#
mongo.ServerIP = 192.168.0.101
#mongo.ServerIP = 115.236.59.91
#
#
mongo.ServerIP = 115.236.59.91
mongo.ServerDBName
=
qbjcPhoenix
#
mongo.ServerDBName = qbjcPhoenix
mongo.Serverport
=
27017
#
mongo.Serverport = 27017
#
mongo.ServerUsername
=
stno
#
mongo.ServerUsername = stno
mongo.ServerPassword
=
stno1q2w3e4r
#
mongo.ServerPassword = stno1q2w3e4r
mongo.authenticationDatabase
=
admin
#
mongo.authenticationDatabase=admin
#
mongo.EventDBName
=
eventMuseum
#
mongo.EventDBName = eventMuseum
mongo.WechatDBName
=
WechatPublic
#
mongo.WechatDBName = WechatPublic
mongo.TestDBName
=
Testqbjc
#
mongo.TestDBName = Testqbjc
#
mongo.weibotagDBName
=
weibotag
#
mongo.weibotagDBName = weibotag
mongo.mediatagDBName
=
mediatag
#
mongo.mediatagDBName = mediatag
#mongo.TagIP = 1.119.44.206
#
#
mongo.TagIP = 1.119.44.206
mongo.TagIP
=
192.168.0.245
#
mongo.TagIP = 192.168.0.245
#mongo.Tagport = 30000
#
#
mongo.Tagport = 30000
mongo.Tagport
=
27017
#
mongo.Tagport = 27017
mongo.connectionsPerHost
=
200
mongo.connectionsPerHost
=
200
mongo.threadsAllowedToBlockForConnectionMultiplier
=
10
mongo.threadsAllowedToBlockForConnectionMultiplier
=
10
...
...
src/main/resources/redis.properties.6380
View file @
51394b16
...
@@ -13,7 +13,7 @@ redis.port=6380
...
@@ -13,7 +13,7 @@ redis.port=6380
redis.keyMaxSize=5000
redis.keyMaxSize=5000
redis.selectDB=1
3
redis.selectDB=1
2
#redis.selectDB=2
#redis.selectDB=2
redis.user_keyMaxSize=1000
redis.user_keyMaxSize=1000
redis.cacheSize=1000
redis.cacheSize=1000
...
...
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