Home > Article > WeChat Applet > WeChat becomes developer mode
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
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
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:
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
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
The above is the detailed content of WeChat becomes developer mode. For more information, please follow other related articles on the PHP Chinese website!