Skip to main content
Version: 1.1.4.1

Installation and Initialization

Prerequisites

Check the following before using BotManager Java Agent.

  1. JDK Version

    • Requires at least JDK 1.8 or higher
    • Designed to be compatible with both JDK 1.8 and the latest JDK
  2. Application Architecture

    • Servlet-based architecture
    • Environment using HTTP or HTTPS
  3. Server Configuration

    • Server must be able to communicate externally via HTTP/HTTPS
    • Network access to https://botmanager.stclab.com is required for communication with macro detection server

Installation Methods

1. Select Domain

Select the domain where you want to install the agent and check configuration values in the BotManager console.

2. Download JAR File

Download the latest JAR file from the link below:

Download Link

3. Add JAR File to Project

Add the downloaded botmanager-java-agent.jar file directly to your project.

Gradle

Add the following to build.gradle:

repositories {
flatDir {
dirs 'libs' // Directory where JAR file is located
}
}

dependencies {
implementation name: 'botmanager-java-agent'
}

Maven

Add the following to pom.xml:

<dependency>
<groupId>com.stclab</groupId>
<artifactId>botmanager-java-agent</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/botmanager-java-agent.jar</systemPath>
</dependency>

4. Initialization

Initialization is required to use BotManager. Add the configuration at application initialization time by referring to the code below.

Code Example:

import com.stclab.botmanager.agent.BotManager;
import com.stclab.botmanager.agent.config.BotManagerConfig;
import org.springframework.stereotype.Component;
import jakarta.annotation.PostConstruct;

@Component
public class BotManagerInitializer {

@PostConstruct
public void initializeBotManager() {
BotManager.initialize(new BotManagerConfig.Builder()
.tenantId("{tenant-id}") // Customer identification ID
.domainName("{domain-name}") // Request domain
.serverUrl("https://botmanager.stclab.com/api/v1/macro") // Detection server
.protectionUrl("https://cdn-botmanager.stclab.com") // Block page URL
.httpRequestTimeout(1000) // HTTP request timeout (ms)
.logLevel("ERROR") // Log level
.build());
System.out.println("BotManager initialized successfully.");
}
}

customId Configuration

customId is an optional configuration value that can be specified as a value that can identify users in the service page.

Examples:

  • User ID when logged in through login authentication
  • Session value when logged in through login authentication

Key Features and Benefits

  1. BotManager Accessor Management Console Integration:

    • When customId is set, you can check detection information based on specific users identifiable within the service.
  2. Multi-Device Blocking:

    • When a user using the same customId accesses through multiple devices, blocking settings are applied equally to those devices.
    • This prevents blocked users from using multiple devices.

Next Steps

After installation is complete, refer to the following documents: