How to import the project into the IDE and start the reference article
In this article you will learn:
1. How to developDebuggingWeChat public account
2. How to turn on developer mode
3. Possible problems
4.weixin_guide How to become a developer mode source code interpretation
How to develop and debug WeChat public accounts
1. Local debugging requires port mapping to the external network. What are the tools?
Recommended ngrok, QQ? Browser
2. Which ngrok can be used?
The previous blog summarized [Let the WeChat public platform access the local machine through port 80. Of course, ngrok is open source and you can also use a server to build one.
3. Development and debugging tools
It is recommended to use real machine testing, WeChat public platforminterfacedebugging tools,WeChat web developer tools
How to enable developers Mode
If the project clone is imported into the IDE and started, and the port has been mapped to the external network, it is relatively simple to become a developer mode.
Test account application address and development document address WIKI
Required before becoming a developer. Make the following configuration:
Modify configuration parameters.png
http://domain name[/project Name】/msg
Modify configuration parameters.pngMessage encryption method
1. For formal environments, it is recommended to use
security Mode , set encrypt<a href="http://www.php.cn/wiki/1342.html" target="_blank">Message</a> to
true,
encodingAesKey<a href="http://www.php.cn/wiki/1051.html" target="_blank"></a> must be followed by
Turn on the randomly generated EncodingAESKey
in the development mode.png to keep it consistent
2. If it is a test, it is recommended to set it to plain text mode to facilitate debugging
Reminder: Become Do not use a browser to access the developer's link (this is for the WeChat public account; an error must occur when accessing). After configuring the project, directly
start the project and do port mapping, and subscribe to the test account or the official environment. Problems that may be encountered when using
#Message encryption and decryption interface JCE unrestricted permission policy
java.security.InvalidKeyException<a href="http://www.php.cn/wiki/265.html" target="_blank">:illegal Key Size</a>
Exception java.security.InvalidKeyException:illegal Key Size solution:
JDK8 version JCE download address
2. For a detailed introduction to Java
servlet version implementation, refer to the previous article written by cnblogs blog 3.
weixin_guide Becoming a developer and all message interactions are required
WeixinMsgController And
WeixinMsgController also
inherits from MsgControllerAdapter Click in to view the source code and you will find that
MsgControllerAdapter is an
abstract class It provides many abstract methods (processing various events and messages), MsgControllerAdapter inherits from
MsgController, one of which is
indexAn interceptor is added to the method
MsgInterceptor<a href="http://www.php.cn/java/java-Interceptor.html" target="_blank"></a>. The interceptor encrypts and verifies the interactive data. Focus on the
checkSignature method
Signature verification
The above is the detailed content of WeChat becomes developer mode. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver CS6
Visual web development tools