It turns out that I installed a program called weixinTest.java to modify the custom menu, but the main method does not execute automatically after the project is run. You need to manually click and run it to take effect. WxTest.java------------------------------------------------- ---------------------------------- public class WxTest {
When I used WeChat to test my account, my menu seemed to be written directly in a main function. Run it first, and then create the menu successfully. Start the server again.
It turns out that I installed a program called weixinTest.java to modify the custom menu, but the main method does not execute automatically after the project is run. You need to manually click and run it to take effect.
WxTest.java------------------------------------------------- ----------------------------------
public class WxTest {
// if (token!=null&&token.getToken()!=null){
// System.out.println("Menu test-----");
// String menu= JSONObject.fromObject(WeChatUtil. initMenu()).toString();
// int result=WeChatUtil.createMenu(token.getToken(),menu);
// if (result==0){
// System.out.print("Create Menu successfuln");
// }else {
// System.out.print("Error code:"+result);
// }
// }
}
You need to wait 24 hours or re-follow WeChat after updating the menu
When I used WeChat to test my account, my menu seemed to be written directly in a main function. Run it first, and then create the menu successfully. Start the server again.