com.eworkcloud.wechat.WechatConfiguration Maven / Gradle / Ivy
package com.eworkcloud.wechat;
import com.eworkcloud.jackson.JacksonTemplate;
import com.eworkcloud.okhttp.OkHttpTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
@Configuration
@EnableConfigurationProperties(WechatProperties.class)
public class WechatConfiguration {
@Resource
private WechatProperties wechatProperties;
@Resource
private OkHttpTemplate okHttpTemplate;
@Resource
private JacksonTemplate jacksonTemplate;
@Bean
public WechatTemplate wechatTemplate() {
return new WechatTemplate(wechatProperties, okHttpTemplate, jacksonTemplate);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy