Java Code Examples for cn.binarywang.wx.miniapp.api.WxMaService#setWxMaConfig()

The following examples show how to use cn.binarywang.wx.miniapp.api.WxMaService#setWxMaConfig() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ApiTestModule.java    From weixin-java-tools with Apache License 2.0 6 votes vote down vote up
@Override
public void configure(Binder binder) {
  try (InputStream inputStream = ClassLoader.getSystemResourceAsStream(TEST_CONFIG_XML)) {
    if (inputStream == null) {
      throw new RuntimeException("测试配置文件【" + TEST_CONFIG_XML + "】未找到,请参照test-config-sample.xml文件生成");
    }
    TestConfig config = TestConfig.fromXml(inputStream);
    config.setAccessTokenLock(new ReentrantLock());

    WxMaService wxService = new cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl();
    wxService.setWxMaConfig(config);

    binder.bind(WxMaService.class).toInstance(wxService);
    binder.bind(WxMaConfig.class).toInstance(config);
  } catch (IOException e) {
    this.log.error(e.getMessage(), e);
  }
}
 
Example 2
Source File: WechatMiniAppAutoConfiguration.java    From fast-family-master with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 3
Source File: WechatMaConfiguration.java    From cola-cloud with MIT License 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig config) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(config);
    return service;
}
 
Example 4
Source File: WxMaConfiguration.java    From sdb-mall with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 5
Source File: MiniAppConfiguration.java    From springboot-seed with MIT License 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 6
Source File: WechatMiniAppConfiguration.java    From loc-framework with MIT License 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig maConfig) {
  WxMaService service = new WxMaServiceImpl();
  service.setWxMaConfig(maConfig);
  return service;
}
 
Example 7
Source File: WechatMiniAppConfiguration.java    From loc-framework with MIT License 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
public WxMaService wxMaService(WxMaConfig maConfig) {
  WxMaService service = new WxMaServiceImpl();
  service.setWxMaConfig(maConfig);
  return service;
}
 
Example 8
Source File: WxConfig.java    From BigDataPlatform with GNU General Public License v3.0 4 votes vote down vote up
@Bean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 9
Source File: WxConfig.java    From dts-shop with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Bean
public WxMaService wxMaService(WxMaConfig maConfig) {
	WxMaService service = new WxMaServiceImpl();
	service.setWxMaConfig(maConfig);
	return service;
}
 
Example 10
Source File: WxConfig.java    From spring-microservice-exam with MIT License 4 votes vote down vote up
@Bean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 11
Source File: WxConfig.java    From mall with MIT License 4 votes vote down vote up
@Bean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 12
Source File: WxConfig.java    From litemall with MIT License 4 votes vote down vote up
@Bean
public WxMaService wxMaService(WxMaConfig maConfig) {
    WxMaService service = new WxMaServiceImpl();
    service.setWxMaConfig(maConfig);
    return service;
}
 
Example 13
Source File: WxMiniAppConfiguration.java    From xiaoyuanxianyu with Apache License 2.0 4 votes vote down vote up
@Bean
public WxMaService Service() {
    WxMaService service  = new WxMaServiceImpl();
    service.setWxMaConfig(WxConfig());
    return service;
}