Home >WeChat Applet >WeChat Development >Detailed introduction to the initial experience of JFinal WeChat development

Detailed introduction to the initial experience of JFinal WeChat development

黄舟
黄舟Original
2017-05-07 14:29:402365browse

WeChat development is a relatively hot industry in the market currently. From WeChat official accounts to WeChat mini programs, it can be said that WeChat has greatly enriched people’s lives, and of course it has also given us developers some New stuff. Today I will learn with my friends how to use jfinal Weixin SDK for rapid development.

1. How to use JFinal Weixin for WeChat development?

JFinal Weixin Speedy Development SDK is a relatively good SDK package; it is mainly used to help Java developers carry out the speedy development of WeChat. First we need to download the SDK resources

The latest version is 1.8. After downloading the SDK, how to operate it? Don't worry, first we should add the jar package to the java web project, which means we need to add the jar package to the "lib" folder in the "WEB-INF" directory.

Detailed introduction to the initial experience of JFinal WeChat development

Add SDK to java web project

2. Quick start

Preparation materials:

  • Apply for a public account

  • Enable developer mode

  • Configure the basic service environment

Information that needs to be configured in the program configuration file :

Serial number Name Remarks
1, token (token) The "clearance password" used during WeChat server verification, token only Used to authenticate developer servers.
2, appId (application ID) The information under the developer ID in the public account platform can be understood as the official account Identification (ID).
3. AppSecret(Application Key) Requires administrator rights to view.
4, EncodingAESKey Message encryption and decryption key.
jdbcUrl = jdbc:mysql://127.0.0.1/jfinal_weixin?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
user = root
password = 
devMode = true

# 微信服务器回调所用的 token
token=your_token(填写你设置的token)

# 测试用的账号
appId=wx9803d1188fa5fbda(填写你的应用ID)
appSecret=db859c968763c582794e7c3d003c3d87(填写你的应用秘钥)

#是否对消息进行加密,是否对消息进行加密,对应于微信平台的消息加解密方式,false支持明文模式及兼容模式,true支持安全模式及兼容模式
#encryptMessage=true
#encodingAesKey=yourEncodingAesKey

Configuration URL (server address)

/****************消息处理**************/
me.add("/msg",WeixinMsgController.class);

Detailed introduction to the initial experience of JFinal WeChat development

Configuration url

After the basic configuration is completed, our official account development road has taken the first step.

The above is the detailed content of Detailed introduction to the initial experience of JFinal WeChat development. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn