修改无忧支付配置
This commit is contained in:
@@ -1,15 +1,37 @@
|
||||
package com.sqx;
|
||||
|
||||
import com.sqx.modules.pay.wuyou.WuyouPay;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author GYJ
|
||||
*/
|
||||
@EnableScheduling
|
||||
@SpringBootApplication
|
||||
public class SqxApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SqxApplication.class, args);
|
||||
ConfigurableApplicationContext context = SpringApplication.run(SqxApplication.class, args);
|
||||
context.getEnvironment().getPropertySources().forEach(source -> {
|
||||
if (source.getName().contains("application-dev.yml") || source.getName().contains("application-prod.yml")) {
|
||||
if (source.getSource() instanceof Map) {
|
||||
((Map<String, Object>) source.getSource()).forEach((key, value) -> {
|
||||
System.out.println(key + ": " + value);
|
||||
if ("pay.orderNotifyUrl".equals(key)) {
|
||||
WuyouPay.setNotifyUrl(value.toString());
|
||||
}
|
||||
if ("pay.extractNotifyUrl".equals(key)) {
|
||||
WuyouPay.setExtractNotifyUrl(value.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
System.out.println("(♥◠‿◠)ノ゙ 短剧系统启动成功 ლ(´ڡ`ლ)゙ \n"+
|
||||
" _ \n" +
|
||||
" | | \n" +
|
||||
@@ -20,4 +42,4 @@ public class SqxApplication {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user