Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WxCpConfigStorage wxCpConfigStorage = this.wxCpService.getWxCpConfigStorage(); #12

Open
steadyliu opened this issue Dec 29, 2020 · 4 comments

Comments

@steadyliu
Copy link

这个获取就会是空的 ,不知为何

@binarywang
Copy link
Owner

设置了吗?是否修改过demo?

@steadyliu
Copy link
Author

private WxCpService wxCpService = new WxCpServiceImpl();
@Autowired private WxCpProperties wxCpProperties ;
@RequestMapping("authorize")
public void authorize(HttpServletRequest request, HttpServletResponse response) throws IOException, WxErrorException {
WxCpDefaultConfigImpl config = new WxCpDefaultConfigImpl();
config.setCorpId(wxCpProperties.getCorpId());
config.setCorpSecret(wxCpProperties.getAppConfigs().get(0).getSecret());
config.setAgentId(wxCpProperties.getAppConfigs().get(0).getAgentId());
config.setToken(wxCpProperties.getAppConfigs().get(0).getToken());
config.setAesKey(wxCpProperties.getAppConfigs().get(0).getAesKey());
String redirectUri ="http://" +request.getServerName()+"/wx/cp/oauth2/getUserInfo"; 我通过这个来设置的。就行了 里面封装的太多了 如果有详细的教程就好了

@binarywang
Copy link
Owner

不要每次请求时去设置参数,你参考demo的做法就不会有问题

@steadyliu
Copy link
Author

demo我直接放到项目了 ,没有看到这块是怎么设置的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants