To install the application server, IDE, and client, Java version 8 or later must first be installed on the computer.
For the application server to work, it must have access to the PostgreSQL database management server of at least version 9.6. The PostgreSQL server must accept connections using password authentication by the md5 or trust method. You can configure authorization by editing the
pg_hba.conf file, as described in the PostgreSQL documentation.
Installing the IDE Plugin
To install the plug-in, Intellij IDEA version 2020.1 or higher must be installed on the computer.
Installing an application server via IDE
- When creating a new lsFusion project click the
Downloadbutton opposed to the
lsFusion library: IDEA automatically downloads the JAR file of the latest (non-beta) version of the lsFusion server from the central server and installs this file as a dependency of this project (or rather, as its only module:
File > Project Structure > Modules > project name > Dependencies tab). Also, if necessary, you can download another version of the server (different from the latest) or select a previously downloaded server JAR file on the local disk.
Note that IDEA remembers the downloaded/specified application server file in its settings and automatically sets it when creating other lsFusion projects.
Install desktop client
- After the server starts, in the start log one of the last lines will be a line with a link to the JNLP file (for example, https://download.lsfusion.org/java/lsfusion-client-5.1.jnlp), which when run will automatically install the client using Java Web Start technology.
Install Web Client
- Install Apache Tomcat version 9.
--add-opens=java.base/java.util=ALL-UNNAMEDto the Apache Tomcat startup parameters if Java version higher than 17 is used.
- Download web-client of lsFusion platform.
- Place the war file in Apache Tomcat webapps folder, for example, with the name lsfusion.war.
- The web client will be available at http://localhost:8080/lsfusion.
Installation in existing Java projects
Installing an application server via IDE
- Download the
lsfusion-server-<version>.jarfile of the required version (for example,
lsfusion-server-5.1.jar) from the central server to the folder of the required project module (we will call this folder
- If the database server is located on another computer, and if authorization is enabled on the database server (for example, for Postgres, using the md5 method and if the postgres password is not empty), set the database server connection parameters (e.g., by creating a startup settings file in the project folder)
- Add the downloaded file as a dependency of the required project module (
File > Project Structure > Modules > module name > Dependencies tab > +)
- Create a startup configuration (when creating a new lsFusion project, this and the upper two sections are done automatically). If the platform is loaded as a library, instead of creating a configuration you can use a Spring bean with the
logicsInstanceID from the
lsfusion.xmlconfiguration file, and its
stop()methods, responsible for starting and stopping the application server, respectively.
For an existing maven project, server installation and loading can (and should) be done differently (see below).
Installing the application server via Maven (only for Maven projects)
pom.xmlor as parent
lsfusion.platform.build:logics, or as dependency
lsfusion.platform:server(at present these artifacts are not in the central repository, and so the path to the lsFusion repository must be specified additionally). For example:
<name>lsFusion Public Repository</name>
The first option (with parent) is good in that:
Maven will automatically configure an uber-jar assembly (i.e., a single file containing all the project files). You can start this assembly using maven profile
assemble- when this profile is activated, a JAR file with an
assemblypostfix is additionally generated in the package phase, containing not only the project files, but also the files of all the project dependencies, including files of the application server itself. However, in cases where the application server is installed separately from the application itself (for example, using automatic installation), including the application server in the resulting uber-jar is undesirable. Therefore, in addition to
assemble, the platform also supports the
noservermaven profile, which when activated (along with
assemble), at creation of a JAR file with the
assemblypostfix the application server files will not be included (example command:
mvn package -P assemble,noserver).
Maven and IDE will automatically determine the source and resources directories (for example,
src/main/lsfusionis the default)
Maven will automatically configure weaving of the application server aspects. However, this is only rarely necessary - if the project has application RMI servers (that is, objects inheriting
lsfusion.interop.server.RmiServerInterface, which are accessed remotely via RMI), or various system annotations of the application server are used (for example,
lsfusion.server.base.caches.IdentityLazyfor caching execution results).
In the second case, all of the above must be manually configured directly by the developer.
As for other projects not created using the operation for creating a new lsFusion project, for a maven project you must manually create a settings file and a startup configuration (or, if the platform needs to be loaded as a library, use a special Spring bean)