|
@@ -7,6 +7,7 @@ import org.springframework.context.annotation.Scope;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.Hashtable;
|
|
|
+import java.util.logging.Logger;
|
|
|
|
|
|
/**
|
|
|
* @Author ROKG
|
|
@@ -15,10 +16,9 @@ import java.util.Hashtable;
|
|
|
* @Modified By:
|
|
|
*/
|
|
|
@ConfigurationProperties(prefix="wechat")
|
|
|
-@Scope(value = "prototype")
|
|
|
+@Scope(value = "session")
|
|
|
@Component
|
|
|
public class WechatConfiguration {
|
|
|
-
|
|
|
private String appId;
|
|
|
|
|
|
private String appSecret;
|
|
@@ -42,6 +42,7 @@ public class WechatConfiguration {
|
|
|
}
|
|
|
|
|
|
public Token getToken(String code) {
|
|
|
+
|
|
|
if (appId != null && appSecret != null) {
|
|
|
token = WechatUtil.getToken(appId, appSecret, code);
|
|
|
}
|