BitSensor Spring Plugin

BitSensor Spring Plugin

The BitSensor plugin for Spring. Works with any Spring application using MVC or Spring Security.

Getting started

This shows how to intercept request and send them to a BitSensor server for analysis.

  1. Follow the README of the BitSensor core plugin

  2. Add java-spring dependencies to pom.xml

  3. Add @EnableBitSensor to your io.bitsensor.spring.configuration:

    public class Application extends SpringBootServletInitializer {
        public static void main(String[] args) throws Exception {
            SpringApplication.run(Application.class, args);
  4. Add your configuration to application.yml:

        username: webgoat
        apiKey: apikey_java
        #URI for protobuf gRPC connector
        uri: dev.bitsensor.io
        #URI for http connector
        uri: http://dev.bitsensor.io:8080        
        queueSize: 1000
        poolSize: 1000
            name: username
        active: bitsensor-test
            enabled: true
            sensitive: false
        level: trace
  5. Get the BitSensor instance to add additional information:

    BitSensor mBitSensor;

Writing handlers

It is possible to add easily add some data to a DataPoint. Just create a bean that implements the Handler interface and you will be able to manipulate every DataPoint that gets collected.

import io.bitsensor.plugins.java.spring.BitSensor;

import javax.inject.Inject;
import javax.inject.Named;

public class CustomHandler implements CoreHandler {

    BitSensor bitSensor;

    public void handle() {


    public ExecutionMoment getExecutionMoment() {