# - IDEA运行Java示例
# 环境准备
- Java JDK1.8
- Apache Tomcat:9.x版本
- Maven 仓库
- IDEA 环境
# 运行步骤
下载
Java
示例代码下载地址:https://api.onlyoffice.com/app_data/editor/Java%20Example.zip
1解压
Java
示例代码使用
IDEA
打开Java Example
文件夹,选择Maven project修改配置文件
settings.properties
参数修改
files.docservice.url.site
地址为自己onlyoffice服务地址
filesize-max=5242880 storage-folder=app_data
files.docservice.viewed-docs=.pdf|.djvu|.xps files.docservice.edited-docs=.docx|.xlsx|.csv|.pptx|.txt files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|.xltx|.xltm|.xlt|.xls|.ods|.fods|.ots|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.rtf|.mht|.html|.htm|.xml|.epub|.fb2 files.docservice.timeout=120000
#files.docservice.url.site=https://documentserver/
files.docservice.url.site=http://192.168.200.118/
files.docservice.url.converter=ConvertService.ashx
files.docservice.url.command=coauthoring/CommandService.ashx
files.docservice.url.api=web-apps/apps/api/documents/api.js
files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html
files.docservice.url.example=
files.docservice.secret= files.docservice.header=Authorization
5. 修改maven仓库指向地址
鉴于国内网络导致下载慢问题,建议使用国内源(本人使用的是aliyun)
2
3
4
5
6
7
添加本地提前准备好的
Tomcat
,选择本地Jdk
配置
Tomcat
的Deployment
启动
Tomcat