企业微信成员新增
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.cp.api.WxCpService;
|
||||
import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
|
||||
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WxCpConfigure {
|
||||
|
||||
|
||||
@Bean
|
||||
public WxCpService wxCpService(){
|
||||
|
||||
WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl();
|
||||
|
||||
config.setCorpId("wwb9f9734e8e124761");
|
||||
config.setAgentId(1000033);
|
||||
config.setCorpSecret("UDSKsn0_LAPYqSwjH9E-AfY_X40lq0sormfe1yV_6Gc");
|
||||
|
||||
WxCpServiceImpl wxCpService = new WxCpServiceImpl();
|
||||
wxCpService.setWxCpConfigStorage(config);
|
||||
|
||||
log.info("企业微信初始化:{}",wxCpService);
|
||||
|
||||
return wxCpService;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.iocoder.yudao.config.WxCpConfigure
|
||||
Reference in New Issue
Block a user