preface
ONLYOFFICE, in a nutshell, is Word, Excel, and PPT Office suite moved to the cloud, only need a browser to use the various functions of Office online.
Environment to prepare
- Java JDK1.8
- Apache Tomcat: 9.x version
- Maven repositories
- The IDEA of environmental
Running steps
-
Download the Java sample code
Download address: https://api.onlyoffice.com/app_data/editor/Java%20Example.zipCopy the code
-
Unzip the Java sample code
-
Use IDEA to open the Java Example folder and select Maven Project
-
Modify the settings.properties parameters of the configuration file
Modify files. Docservice. Url. The site address onlyoffice service for yourself
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|.pot x|.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
Copy the code
-
Modify the Maven repository pointing address
In view of the slow download caused by the domestic network, it is suggested to use the domestic source (I used Aliyun).
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
Copy the code
-
To add the local Tomcat prepared in advance, select the local Jdk
-
Configure the Deployment of Tomcat
-
Start Tomcat
-
Effect of interface
-
Pay attention to
If the host on which onlyOffice is deployed and the local operating environment are not on the same host, change localhost to the LOCAL IP address, and the network is normal
Article continues to update, more can be wechat search “a demand”, this is actually very simple, how to achieve I don’t care!