Configure your Bot for BDK 2.0 for Java

1. Generate your Bot

Building your Project using the Symphony Bot Generator

This section requires npm (Node Package Manager) to be installed on your local machine as a prerequisite.
The Symphony Generator offers a fast way to bootstrap your Symphony BDK 2.0 project in several languages, including Java.
For all Symphony BDK 2.0 applications, you should start with the Symphony Bot Generator. As part of the below steps we will also be installing Yeoman which is a project scaffolding framework utility.
$ npm i -g yo @finos/generator-symphony
$ mkdir botProject && cd botProject
$ yo @finos/symphony
This will prompt you with a number of questions about your bot and Pod configuration. Type in your bot's metadata, use arrows to scroll, and press enter to move on to the next prompt:

Spring Boot Integration

The BDK 2.0 for Java and Symphony Bot Generator provides an available Spring Boot Integration out of the box. To bootstrap your bot as a Spring Boot project, select the 'Spring Boot' option when prompted to 'select your framework' when going through the generator's options.
$ yo @finos/symphony
__ __ ___ _
\ \ / /__ / __|_ _ _ __ _ __| |_ ___ _ _ _ _
\ V / _ \ \__ \ || | ' \| '_ \ ' \/ _ \ ' \ || |
|_|\___/ |___/\_, |_|_|_| .__/_||_\___/_||_\_, |
|__/ |_| |__/
Welcome to Symphony Generator v2.6.0
Application files will be generated in folder: /Users/Development/bdk-sample-bot
? Enter your pod host
? Enter your bot username bdk-sample-bot
? Select your type of application Bot Application
? Select your programing language Java
? Select your framework Java (no framework)
? Select your build system Maven
? Enter your project groupId com.symphony
? Enter your project artifactId bot-application
? Enter your base package com.symphony.bdksamplebot
Generating RSA keys...
Your Java project has been successfully generated !

Building your project from scratch

This section will help you to understand how to create your bot application from scratch.

Maven-based project

If you want to use Maven as build system, you have to configure your root pom.xml as such:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
<description>Demo project for Symphony BDK</description>
<!-- Core dependencies -->
<artifactId>symphony-bdk-http-jersey2</artifactId> <!-- or symphony-bdk-http-webclient -->
<artifactId>symphony-bdk-template-freemarker</artifactId> <!-- or symphony-bdk-http-handlebars -->
<!-- Logger Configuration -->

Gradle-based project

If you want to use Gradle as build system, you have to configure your root build.gradle as such:
plugins {
id 'java-library'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
repositories {
dependencies {
// import a BOM
implementation platform('org.finos.symphony.bdk:symphony-bdk-bom:2.1.0')
// define dependencies without versions
implementation 'org.finos.symphony.bdk:symphony-bdk-core'
runtimeOnly 'org.finos.symphony.bdk:symphony-bdk-http-jersey2' // or symphony-bdk-http-webclient
runtimeOnly 'org.finos.symphony.bdk:symphony-bdk-template-freemarker' // or symphony-bdk-http-handlebars
// logger configuration
implementation 'org.slf4j:slf4j-api'
runtimeOnly 'ch.qos.logback:logback-classic'

2. Configure your Bot

Once you have your generated bot scaffold, the next step is to configure your bot user.
Ensure that your pod admin has created a corresponding service account on the admin portal of your Symphony Pod. Additionally, you must upload the generated RSA public key for the service account created.
Copy the entire contents of this RSA public key including the dashes on either side, and hand it to your pod admin and request for it to be saved against the respective service account you will be using.
Note: The bot username and bot email address entered to the Symphony Bot Generator must match exactly the Basic Information shown in the Pod above.

Create configuration file

Before implementing any code, you need to navigate to your src/main/resources/config.yaml configuration file, and adjust it according to your Symphony environment. The following configuration file is generated by default:
username: bdk-documentation-bot
privateKeyPath: /bdk-documentation-bot/src/main/resources/rsa/privatekey.pem
Depending on your Symphony environment you may need to make, update and add additional values to your config.yaml file.
Click here for more detailed documentation about BDK configuration

3. Build your Bot

Now that you have configured your Bot project using the BDK 2.0 and Symphony Bot Generator, checkout one of our dedicated BDK 2.0 tutorials: