feat: adjust nacos config yaml
This commit is contained in:
@@ -97,21 +97,6 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger 依赖项 -->
|
||||
<!-- <dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency> -->
|
||||
<!-- <dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
@@ -132,12 +117,7 @@
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
</executions>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
|
||||
@@ -1,31 +1,53 @@
|
||||
package org.wfc.payment;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.wfc.common.security.annotation.EnableCustomConfig;
|
||||
import org.wfc.common.security.annotation.EnableRyFeignClients;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.wfc.payment.ccpay.config.CcpayConfig;
|
||||
|
||||
/**
|
||||
* Pay module
|
||||
* Payment module
|
||||
*
|
||||
* @author wfc
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = {"org.wfc.payment"})
|
||||
@ConfigurationPropertiesScan("org.wfc.payment")
|
||||
public class WfcPaymentApplication
|
||||
{
|
||||
// @Autowired
|
||||
// private LocaleMessageUtil localeMessageUtil;
|
||||
private static final Logger logger = LoggerFactory.getLogger(WfcPaymentApplication.class);
|
||||
|
||||
// @GetMapping("/greeting")
|
||||
// public String greeting() {
|
||||
// return localeMessageUtil.getMessage("greeting.message");
|
||||
// }
|
||||
private final CcpayConfig ccpayConfig;
|
||||
|
||||
@Autowired
|
||||
public WfcPaymentApplication(CcpayConfig ccpayConfig) {
|
||||
this.ccpayConfig = ccpayConfig;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(WfcPaymentApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ Payment module startup ლ(´ڡ`ლ)゙ \n");
|
||||
logger.info("(♥◠‿◠)ノ゙ Payment module startup ლ(´ڡ`ლ)゙ \n");
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void printConfig() {
|
||||
System.out.println("CCPay URL: " + ccpayConfig.getUrl());
|
||||
System.out.println("CCPay API Key: " + ccpayConfig.getApiKey());
|
||||
System.out.println("CCPay Merchant ID: " + ccpayConfig.getMerchantId());
|
||||
System.out.println("CCPay Currency: " + ccpayConfig.getCurrency());
|
||||
System.out.println("CCPay Timeout: " + ccpayConfig.getTimeout());
|
||||
System.out.println("CCPay Callback URL: " + ccpayConfig.getCallbackUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: ${NACOS_SERVER_ADDR:wfc-nacos}:${NACOS_SERVER_PORT:8848}
|
||||
namespace: ${NACOS_NAMESPACE:wfc-prod}
|
||||
namespace: ${NACOS_NAME_SPACE:wfc-prod}
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
@@ -64,9 +64,9 @@ mybatis-plus:
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
# swagger配置
|
||||
# swagger configuration
|
||||
swagger:
|
||||
title: 系统模块接口文档
|
||||
title: payment modules api
|
||||
license: Powered By wfc
|
||||
licenseUrl: https://wfc.vip
|
||||
|
||||
@@ -92,7 +92,7 @@ wxpay:
|
||||
mchKey: 1525342aa
|
||||
subAppId: #服务商模式下的子商户公众账号ID
|
||||
subMchId: #服务商模式下的子商户号
|
||||
keyPath: /opt/wfc/config/payment/wxpay_key.pem
|
||||
keyPath: /opt/wfc/conf/wxpay/wxpay_key.pem
|
||||
useSandboxEnv: false
|
||||
|
||||
alipay:
|
||||
@@ -104,7 +104,7 @@ alipay:
|
||||
signType: RSA2
|
||||
charset: utf-8
|
||||
gatewayUrl: https://openapi.alipaydev.com/gateway.do
|
||||
logPath: /opt/wfc/config/payment/alipay_log.txt
|
||||
logPath: /opt/wfc/logs/alipay/alipay_log.txt
|
||||
maxQueryRetry: 5
|
||||
queryDuration: 5
|
||||
maxCancelRetry: 3
|
||||
@@ -118,8 +118,8 @@ alipay:
|
||||
|
||||
ccpay:
|
||||
url: https://api.paymentgateway.com/v1/payments
|
||||
apiKey: your-api-key
|
||||
merchantId: your-merchant-id
|
||||
apiKey: api-key
|
||||
merchantId: merchant-id
|
||||
currency: USD
|
||||
timeout: 30
|
||||
callbackUrl: https://yourdomain.com/payment/callback
|
||||
callbackUrl: https://wfc-gateway:${GATEWAY_SERVER_PORT:8080}/payment/callback
|
||||
@@ -9,7 +9,7 @@ spring:
|
||||
name: wfc-payment
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: '@profileName@'
|
||||
active: ${NACOS_PROFILE_NAME:prod}
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/wfc-pay" />
|
||||
<property name="log.path" value="logs/wfc-payment" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user