更新属性文件配置参数
This commit is contained in:
parent
7324306d77
commit
17c312b295
22
README.md
22
README.md
@ -16,21 +16,26 @@ Spring Boot API Project for WeChat-J library.
|
|||||||
我们旨在提供一个初始化的开发框架,能够让应用在使用 Spring Boot 框架的基础上让你的微信公众号快速接入微信平台。
|
我们旨在提供一个初始化的开发框架,能够让应用在使用 Spring Boot 框架的基础上让你的微信公众号快速接入微信平台。
|
||||||
|
|
||||||
# 项目配置
|
# 项目配置
|
||||||
|
|
||||||
和所有的 Java 项目的标准配置一样,你首先需要把依赖添加到你的项目中,然后完成属性文件配置。
|
和所有的 Java 项目的标准配置一样,你首先需要把依赖添加到你的项目中,然后完成属性文件配置。
|
||||||
|
|
||||||
在这个基础上,需要有一些先决条件。
|
在这个基础上,需要有一些先决条件。
|
||||||
|
|
||||||
## 先决条件
|
## 先决条件
|
||||||
需要对微信公众号进行测试,你首先需要有一个微信公众号,如果没有的话,你可以使用微信提供的测试公众号来获得需要的 appID 和 appsecret。
|
|
||||||
|
需要对微信公众号进行测试,你首先需要有一个微信公众号,如果没有的话,你可以使用微信提供的测试公众号来获得需要的 appID 和
|
||||||
|
appsecret。
|
||||||
|
|
||||||
* [微信测试平台获得测试账号](https://www.ossez.com/t/topic/14281)
|
* [微信测试平台获得测试账号](https://www.ossez.com/t/topic/14281)
|
||||||
|
|
||||||
|
|
||||||
## 依赖
|
## 依赖
|
||||||
|
|
||||||
项目使用的是 Maven,如果你只希望使用 WeChat-J,你只需要往你的项目中添加依赖即可。
|
项目使用的是 Maven,如果你只希望使用 WeChat-J,你只需要往你的项目中添加依赖即可。
|
||||||
|
|
||||||
因为我们目前还在对项目进行整理,所以还是使用的 SNAPSHOT 版本。
|
因为我们目前还在对项目进行整理,所以还是使用的 SNAPSHOT 版本。
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ossez.wechat</groupId>
|
<groupId>com.ossez.wechat</groupId>
|
||||||
<artifactId>wechat-j-oa</artifactId>
|
<artifactId>wechat-j-oa</artifactId>
|
||||||
@ -39,12 +44,13 @@ Spring Boot API Project for WeChat-J library.
|
|||||||
```
|
```
|
||||||
|
|
||||||
## 修改配置文件
|
## 修改配置文件
|
||||||
|
|
||||||
```properties
|
```properties
|
||||||
# 公众号配置(必填)
|
# WeChat Official Cccount Conf
|
||||||
wx.mp.appId = appId
|
wechat.official-account.app-id=appId
|
||||||
wx.mp.secret = @secret
|
wechat.official-account.secret=secret
|
||||||
wx.mp.token = @token
|
wechat.official-account.token=token
|
||||||
wx.mp.aesKey = @aesKey
|
wechat.official-account.aes-key=aesKey
|
||||||
# 存储配置redis(可选)
|
# 存储配置redis(可选)
|
||||||
wx.mp.config-storage.type=Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
wx.mp.config-storage.type=Jedis # 配置类型: Memory(默认), Jedis, RedisTemplate
|
||||||
wx.mp.config-storage.key-prefix=wx # 相关redis前缀配置: wx(默认)
|
wx.mp.config-storage.key-prefix=wx # 相关redis前缀配置: wx(默认)
|
||||||
@ -64,7 +70,9 @@ Spring Boot API Project for WeChat-J library.
|
|||||||
#wx.mp.hosts.open-host=http://proxy.com/
|
#wx.mp.hosts.open-host=http://proxy.com/
|
||||||
#wx.mp.hosts.mp-host=http://proxy.com/
|
#wx.mp.hosts.mp-host=http://proxy.com/
|
||||||
```
|
```
|
||||||
|
|
||||||
## 自动注入的类型
|
## 自动注入的类型
|
||||||
|
|
||||||
- `WxMpService`
|
- `WxMpService`
|
||||||
- `WxMpConfigStorage`
|
- `WxMpConfigStorage`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user