- You must define your own application.properties file from the template file.
cp src/main/resources/application.properties.template application.properties
- Uncomment the following lines and input your values
spring.datasource.url = jdbc:mysql://<your-db-host>:3306/club?useUnicode=true&characterEncoding=utf-8
spring.datasource.username = <your-db-user-name>
spring.datasource.password = <your-db-password>
wechat.mp.appId= <your-appid>
wechat.mp.secret= <your-secret>
wechat.mp.token= <your-token>
wechat.mp.aesKey= <your-aesKey>
- Put your application.properties file under current directory or under Java class path
- Then run your application
java -jar target/education.jar
- Logon to your media platform account: https://mp.weixin.qq.com/
- Edit your "接口配置信息"
URL = http://<server-url>/wechat/portal
- Edit "网页授权获取用户基本信息", add to the whitelist
- Copy and edit
/src/main/resources/wechat/menu.json
"sub_button":[
{
"type":"view",
"name":"...",
"url":"http://<server-url>/user/center"
}
- Create your menu from menu.json
Enjoy.