Java/Spring Boot - JHipster


  • SpringBoot 3+
  • Spring 6+


Deprecated JavaEE support

Version 1.x of the DataDome Java Module is compatible with the deprecated JavaEE.

Add dependency for DataDome Java Module

When using Maven, update your pom.xml file with the following content:


Register the DataDomeFilter

Add a FilterRegistrationBean in your Java web configuration file. It has to be registered with the highest priority order.
For JHipster, you may use

public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> {
		/* section to copy */
    public FilterRegistrationBean<DataDomeFilter> dataDomeFilter() {
        FilterRegistrationBean<DataDomeFilter> filterRegistrationBean = new FilterRegistrationBean<>();
        filterRegistrationBean.setFilter(new DataDomeFilter());
        filterRegistrationBean.addInitParameter("datadome.apikey", "YOUR_DATADOME_SERVER_SIDE_KEY");   
        return filterRegistrationBean;
		/* end of section*/

List of possible init parameters to add in the iniParameters map:

datadome.apikeyLicense key to access API
datadome.hostnameAPI server's hostname
Available endpoints
datadome.sslUse SSL between the filter and the API servertrue
datadome.regexInclusion Regex""
datadome.exclusion_regexExclusion Regex\.(js|css|jpg|jpeg|png|ico|gif|tiff|svg|woff|woff2|ttf|eot|mp4|otf)$
datadome.connection_timeoutConnection timeout (in ms)150
datadome.read_timeoutRead timeout (in ms)50
datadome.max_connectionsMaximum open connections to the API server100
datadome.use_x_forwarded_hostUse the request header x-forwarded-host instead of host (used for cookie, dashboard domain...)false
datadome.proxy_serverHost that will be used as proxy server
See here
datadome.proxy_portTCP port at the proxy server
See here
datadome.proxy_sslIs the connection to the proxy established through TLS
See here
datadome.skip_ipsIPv4 or IPv6 subnetwork list on which DataDome validation is not executed, e.g.: "2a03:2880:1000::/36,"


How do I call the DataDome API via an outbound proxy?

The DataDome module can be used with an outbound proxy. Two options are available for the proxy configuration:

  • Use system settings such as -Dhttp.proxyHost= -Dhttp.proxyPort=8080 -Dhttps.proxyHost= -Dhttps.proxyPort=8443 when running your Java application.

  • Use optional DataDome init parameters datadome.proxy_server, datadome.proxy_port, datadome.proxy_ssl in web.xml.


Network latency

Using the DataDome module with an outbound proxy can slow down the request to DataDome API and increase timeouts. Please adjust timeout settings accordingly.