mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
支付宝登录
This commit is contained in:
@@ -36,6 +36,7 @@ public class InitializeAdapayConfig implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
log.info(">>>>>>>>>>>>>>>服务启动执行,执行加载数据等操作 InitializeAdapayConfig order 1 <<<<<<<<<<<<<");
|
||||
/*
|
||||
单商户
|
||||
*/
|
||||
|
||||
@@ -3,25 +3,34 @@ package com.jsowell.alipay.config;
|
||||
import com.alipay.easysdk.factory.Factory;
|
||||
import com.alipay.easysdk.kernel.Config;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Order(5)
|
||||
@Data
|
||||
@Slf4j
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "alipay")
|
||||
@Order(2)
|
||||
public class AliPayConfig implements CommandLineRunner {
|
||||
@Value("${alipay.gatewayHost}")
|
||||
private String gatewayHost;
|
||||
|
||||
@Value("${alipay.appId}")
|
||||
private String appId;
|
||||
|
||||
@Value("${alipay.merchantPrivateKey}")
|
||||
private String merchantPrivateKey;
|
||||
|
||||
@Value("${alipay.alipayPublicKey}")
|
||||
private String alipayPublicKey;
|
||||
|
||||
@Value("${alipay.notifyUrl}")
|
||||
private String notifyUrl;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
log.info(">>>>>>>>>>>>>>>服务启动执行,执行加载数据等操作 AliPayConfig order 2 <<<<<<<<<<<<<");
|
||||
// 设置参数(全局只需设置一次)
|
||||
Config config = new Config();
|
||||
config.protocol = Constants.HTTPS;
|
||||
|
||||
@@ -78,7 +78,7 @@ public class WechatPayConfig implements CommandLineRunner {
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
// System.out.println(">>>>>>>>>>>>>>>服务启动执行,执行加载数据等操作 MyStartupRunner1 order 2 <<<<<<<<<<<<<");
|
||||
System.out.println(">>>>>>>>>>>>>>>服务启动执行,执行加载数据等操作 WechatPayConfig order 3 <<<<<<<<<<<<<");
|
||||
//微信支付
|
||||
WeChatPayParameter.mchId = wechatMchId;
|
||||
WeChatPayParameter.appId = wechatAppId;
|
||||
|
||||
Reference in New Issue
Block a user