com.rollbar.spring.webmvc.RollbarWebApplicationInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rollbar-spring6-webmvc Show documentation
Show all versions of rollbar-spring6-webmvc Show documentation
For connecting your applications built on the JVM to Rollbar for Error Reporting
package com.rollbar.spring.webmvc;
import com.rollbar.web.listener.RollbarRequestListener;
import jakarta.servlet.ServletContext;
import org.springframework.web.WebApplicationInitializer;
public class RollbarWebApplicationInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) {
// Attach the RollbarRequestListner to attribute HTTP Request data into the Exception object
// This will be visible in Rollbar
container.addListener(RollbarRequestListener.class);
}
}