Commit 2fb6cc89 authored by shiyu's avatar shiyu

兼容多个小程序配置3

parent c990b5c6
...@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -50,7 +51,8 @@ public class QdWxLoginManager { ...@@ -50,7 +51,8 @@ public class QdWxLoginManager {
// 微信小程序获取短链接地址 // 微信小程序获取短链接地址
private static final String GET_LINK_URL = "https://api.weixin.qq.com/wxa/genwxashortlink?access_token=%s"; private static final String GET_LINK_URL = "https://api.weixin.qq.com/wxa/genwxashortlink?access_token=%s";
@Resource(name = "qdWxMaService") @Autowired
@Qualifier("qdWxMaService")
private WxMaService qdWxMaService; private WxMaService qdWxMaService;
@Autowired @Autowired
......
...@@ -24,7 +24,7 @@ public class QdWxConfig { ...@@ -24,7 +24,7 @@ public class QdWxConfig {
@Qualifier("qdWxMaConfig") @Qualifier("qdWxMaConfig")
public WxMaConfig qdWxMaConfig() { public WxMaConfig qdWxMaConfig() {
WxMaInMemoryConfig config = new WxMaInMemoryConfig(); WxMaInMemoryConfig config = new WxMaInMemoryConfig();
config.setAppid(qdWxProperties.getQdAppId()); config.setAppid(qdWxProperties.getAppId());
config.setSecret(qdWxProperties.getAppSecret()); config.setSecret(qdWxProperties.getAppSecret());
return config; return config;
} }
......
...@@ -35,12 +35,12 @@ public class QdWxProperties { ...@@ -35,12 +35,12 @@ public class QdWxProperties {
this.mchKey = mchKey; this.mchKey = mchKey;
} }
public String getQdAppId() { public String getAppId() {
return appId; return appId;
} }
public void setQdAppId(String qdAppId) { public void setAppId(String appId) {
this.appId = qdAppId; this.appId = appId;
} }
public String getAppSecret() { public String getAppSecret() {
......
...@@ -3,16 +3,15 @@ dts: ...@@ -3,16 +3,15 @@ dts:
#乾岛 #乾岛
app-id: wx598b9e95a8b13209 app-id: wx598b9e95a8b13209
app-secret: 107406ff0fcc8d7c3a658b90dd938a08 app-secret: 107406ff0fcc8d7c3a658b90dd938a08
merchant-id: 123 merchant-id: 1234
private-key: 123 private-key: 1234
merchant-serial_number: 123 merchant-serial_number: 12344
apiV3Key: 123123 apiV3Key: 1231234
pay-notify-url: 123 pay-notify-url: 12334
# 开发者应该设置成自己的wx相关信息 # 开发者应该设置成自己的wx相关信息
# 更换主体要更换id和secret # 更换主体要更换id和secret
wx: wx:
app-id: wx5b4409448bf2c72b app-id: wx5b4409448bf2c72b
app-secret: 6fee0d7b2197845fed0a3fe8f5a9bd66 app-secret: 6fee0d7b2197845fed0a3fe8f5a9bd66
merchant-id: 123 merchant-id: 123
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment