Java

To enable java code generation for the client side, select Java as the programming language under Configuration > Client. Additionally, you need to specify three directories where the client code will be generated.

Configuration in VisualBoost
  • Source directory: The relative path to a directory that contains the Root java package.

  • Root java package: This directory contains the controller class that can be used to execute the REST functions.

  • Model java package: This package contains all model, classes and enums.

These settings allow you to configure the folder.

generated directories and files

To generate the client side, it is necessary to specify the Git repository for the frontend project in the settings.

Dependencies

The generated Java code uses the OkHttp library for network communication and GSON for the serialization and deserialization of JSON objects.

Therefore, the following dependencies are needed:

<dependencies>
    <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <version>4.10.0</version>
    </dependency>

    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.9.0</version>
    </dependency>
</dependencies>

Last updated