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

  1. Download the Java sample code

    Download address: https://api.onlyoffice.com/app_data/editor/Java%20Example.zipCopy the code
  2. Unzip the Java sample code

  3. Use IDEA to open the Java Example folder and select Maven Project

  1. 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
  1. 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
  1. To add the local Tomcat prepared in advance, select the local Jdk

  1. Configure the Deployment of Tomcat

  1. Start Tomcat

  1. Effect of interface

  1. 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!