|
@@ -18,6 +18,7 @@ import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
@ComponentScan(basePackages = {"com.xingxi.unifiedpay"})
|
|
@ComponentScan(basePackages = {"com.xingxi.unifiedpay"})
|
|
|
|
|
+@ConditionalOnProperty(prefix = "spring.application.xingxi.unifiedpay", name = "enabled", havingValue = "true")
|
|
|
@EnableConfigurationProperties(XingxiUnifiedpayWxPayProperties.class)
|
|
@EnableConfigurationProperties(XingxiUnifiedpayWxPayProperties.class)
|
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
|
@ConditionalOnBean(XingxiUnifiedpayRepository.class)
|
|
@ConditionalOnBean(XingxiUnifiedpayRepository.class)
|
|
@@ -26,16 +27,17 @@ class XingxiUnifiedpayConfiguration {
|
|
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
|
@ConditionalOnMissingBean(XingxiUnifiedpayCallbackServiceI.class)
|
|
@ConditionalOnMissingBean(XingxiUnifiedpayCallbackServiceI.class)
|
|
|
- XingxiUnifiedpayCallbackServiceI xingxiUnifiedpayCallbackServiceI(){
|
|
|
|
|
|
|
+ XingxiUnifiedpayCallbackServiceI biandanUnifiedpayCallbackServiceI(){
|
|
|
return new XingxiUnifiedpayCallbackServiceI() {
|
|
return new XingxiUnifiedpayCallbackServiceI() {
|
|
|
@Override
|
|
@Override
|
|
|
- public void callbackFollowUpProcessing(XingxiUnifiedpayCallbackResultDTO xingxiUnifiedpayCallbackResultDTO) {
|
|
|
|
|
- throw new RuntimeException("业务实现[XingxiUnifiedpayCallbackServiceI]");
|
|
|
|
|
|
|
+ public void callbackFollowUpProcessing(XingxiUnifiedpayCallbackResultDTO biandanUnifiedpayCallbackResultDTO) {
|
|
|
|
|
+ throw new RuntimeException("业务实现[BiandanUnifiedpayCallbackServiceI]");
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Bean("wxPayService")
|
|
@Bean("wxPayService")
|
|
|
|
|
+ @ConditionalOnProperty(prefix = "spring.application.xingxi.unifiedpay.wxpay", name = "enabled", havingValue = "true")
|
|
|
WxPayService wxPayService() {
|
|
WxPayService wxPayService() {
|
|
|
final WxPayService wxPayService = new WxPayServiceImpl();
|
|
final WxPayService wxPayService = new WxPayServiceImpl();
|
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
@@ -55,5 +57,4 @@ class XingxiUnifiedpayConfiguration {
|
|
|
wxPayService.setConfig(payConfig);
|
|
wxPayService.setConfig(payConfig);
|
|
|
return wxPayService;
|
|
return wxPayService;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|