-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d670d6
commit 0cb60a8
Showing
6 changed files
with
88 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package com.qzx.xdupartner.service; | ||
|
||
public interface MsmService { | ||
boolean send(String phone); | ||
boolean send(String phone, String verificationCode); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 22 additions & 21 deletions
43
src/main/java/com/qzx/xdupartner/util/MsmConstantUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,47 @@ | ||
package com.qzx.xdupartner.util; | ||
|
||
import org.springframework.beans.factory.InitializingBean; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
|
||
//实现了InitializingBean接口,当spring进行初始化bean时,会执行afterPropertiesSet方法 | ||
@Component | ||
public class MsmConstantUtils implements InitializingBean { | ||
|
||
// @Value("${tencent.msm.id}") | ||
// private String secretID ; | ||
// | ||
// @Value("${tencent.msm.secret}") | ||
// private String secretKey ; | ||
// | ||
@Value("${tencent.msm.id}") | ||
private String secretID; | ||
|
||
@Value("${tencent.msm.secret}") | ||
private String secretKey; | ||
|
||
// @Value("${tencent.msm.endPoint}") | ||
// private String endPoint; | ||
// | ||
// @Value("${tencent.msm.appId}") | ||
// private String appId; | ||
// | ||
// @Value("${tencent.msm.signName}") | ||
// private String signName; | ||
// | ||
// @Value("${tencent.msm.templateId}") | ||
// private String templateId; | ||
|
||
@Value("${tencent.msm.appId}") | ||
private String appId; | ||
|
||
@Value("${tencent.msm.signName}") | ||
private String signName; | ||
|
||
@Value("${tencent.msm.templateId}") | ||
private String templateId; | ||
//六个相关的参数 | ||
public static String SECRET_ID; | ||
public static String SECRET_KEY; | ||
public static String END_POINT; | ||
// public static String END_POINT; | ||
public static String APP_ID; | ||
public static String SIGN_NAME; | ||
public static String TEMPLATE_ID; | ||
|
||
@Override | ||
public void afterPropertiesSet() throws Exception { | ||
// SECRET_ID = secretID; | ||
// SECRET_KEY = secretKey; | ||
SECRET_ID = secretID; | ||
SECRET_KEY = secretKey; | ||
// END_POINT = endPoint; | ||
// APP_ID = appId; | ||
// SIGN_NAME = signName; | ||
// TEMPLATE_ID = templateId; | ||
APP_ID = appId; | ||
SIGN_NAME = signName; | ||
TEMPLATE_ID = templateId; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters