Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dmhub-plugin
Project
Project
Details
Activity
Releases
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
qinxunjia
dmhub-plugin
Commits
166af8e9
Commit
166af8e9
authored
Sep 23, 2020
by
qinxunjia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https配置
parent
ec3564d0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
3 deletions
+19
-3
BgySMSConfig.java
...ain/java/com/bgy/sms/channel/bgy/config/BgySMSConfig.java
+1
-0
SendSmsUtil.java
src/main/java/com/bgy/sms/channel/bgy/utils/SendSmsUtil.java
+2
-2
DmHubConfig.java
...in/java/com/bgy/sms/channel/dmHub/config/DmHubConfig.java
+7
-0
MessageServiceImpl.java
...ain/java/com/bgy/sms/service/impl/MessageServiceImpl.java
+6
-0
application-dev.yml
src/main/resources/application-dev.yml
+1
-0
application-k8s.yml
src/main/resources/application-k8s.yml
+1
-0
application-test.yml
src/main/resources/application-test.yml
+1
-0
application.yml
src/main/resources/application.yml
+0
-1
No files found.
src/main/java/com/bgy/sms/channel/bgy/config/BgySMSConfig.java
View file @
166af8e9
...
...
@@ -19,6 +19,7 @@ public class BgySMSConfig {
public
static
String
api
;
@Value
(
"${system.config.bgy.appId}"
)
public
void
setAppId
(
String
appId
)
{
BgySMSConfig
.
appId
=
appId
;
...
...
src/main/java/com/bgy/sms/channel/bgy/utils/SendSmsUtil.java
View file @
166af8e9
...
...
@@ -28,8 +28,8 @@ public class SendSmsUtil {
url
=
new
URL
(
path
);
HttpURLConnection
httpURLConnection
=
(
HttpURLConnection
)
url
.
openConnection
();
httpURLConnection
.
setRequestMethod
(
"POST"
);
// 提交模式
httpURLConnection
.
setConnectTimeout
(
1
0000
);
//连接超时 单位毫秒
httpURLConnection
.
setReadTimeout
(
1
0000
);
//读取超时 单位毫秒
httpURLConnection
.
setConnectTimeout
(
3
0000
);
//连接超时 单位毫秒
httpURLConnection
.
setReadTimeout
(
3
0000
);
//读取超时 单位毫秒
// 发送POST请求必须设置如下两行
httpURLConnection
.
setDoOutput
(
true
);
httpURLConnection
.
setDoInput
(
true
);
...
...
src/main/java/com/bgy/sms/channel/dmHub/config/DmHubConfig.java
View file @
166af8e9
package
com
.
bgy
.
sms
.
channel
.
dmHub
.
config
;
import
com.bgy.sms.channel.bgy.config.BgySMSConfig
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
...
...
@@ -18,6 +19,8 @@ public class DmHubConfig {
public
static
String
shortUrl
;
public
static
boolean
surlConfig
;
@Value
(
"${system.config.dmHub.applicationId}"
)
public
void
setApplicationId
(
String
applicationId
)
{
DmHubConfig
.
applicationId
=
applicationId
;
...
...
@@ -52,6 +55,10 @@ public class DmHubConfig {
public
void
setShortUrl
(
String
shortUrl
)
{
DmHubConfig
.
shortUrl
=
shortUrl
;
}
@Value
(
"${system.config.dmHub.surlConfig}"
)
public
void
setSurlConfig
(
Boolean
surlConfig
)
{
DmHubConfig
.
surlConfig
=
surlConfig
;
}
}
src/main/java/com/bgy/sms/service/impl/MessageServiceImpl.java
View file @
166af8e9
...
...
@@ -573,6 +573,12 @@ public class MessageServiceImpl implements MessageService {
System
.
out
.
println
(
substring
);
keyBuffer
=
new
StringBuffer
(
substring
);
}
else
{
if
(
"surl"
.
equals
(
key
))
{
if
(
DmHubConfig
.
surlConfig
)
{
info
=
"https://"
+
info
;
}
}
paramsMap
.
put
(
keyBuffer
.
toString
(),
String
.
valueOf
(
info
));
keyList
.
add
(
keyBuffer
.
toString
());
int
key1
=
keyBuffer
.
indexOf
(
key
);
...
...
src/main/resources/application-dev.yml
View file @
166af8e9
...
...
@@ -52,6 +52,7 @@ system:
appId
:
1smsdemo
appSecret
:
ac031765c3a8c9acc4747808e4fe5918
shortUrl
:
urlshort-xsma-sit.bgy.com.cn
surlConfig
:
false
logging
:
level
:
debug
...
...
src/main/resources/application-k8s.yml
View file @
166af8e9
...
...
@@ -49,6 +49,7 @@ system:
appId
:
${smsAppId}
appSecret
:
${smsSecret}
shortUrl
:
${shortUrl}
surlConfig
:
${surlConfig}
logging
:
level
:
${logLevel}
...
...
src/main/resources/application-test.yml
View file @
166af8e9
...
...
@@ -48,6 +48,7 @@ system:
appId
:
1smsdemo
appSecret
:
ac031765c3a8c9acc4747808e4fe5918
shortUrl
:
urlshort-xsma-sit.bgy.com.cn
surlConfig
:
true
logging
:
level
:
debug
...
...
src/main/resources/application.yml
View file @
166af8e9
...
...
@@ -8,7 +8,6 @@ info:
spring
:
profiles
:
# active: test
active
:
${sms-active}
mybatis-plus
:
...
...
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