Skip to main content

What is the Spring Boot Starter

The Atoti What-If Spring Boot Starter provides auto-configuration for all What-If components. Instead of manually defining beans for the simulation engine, workflow, persistence, and security managers, the starter configures these automatically. Benefits of using the starter:
  • Minimal configuration required
  • Sensible defaults for all components
  • Easy customization through properties
  • Ability to override any auto-configured bean

Prerequisites

  • Java 21 or later
  • Spring Boot 3.x
  • Atoti Server 6.1.x
  • Hibernate on the classpath (for JPA persistence)

How to add the dependency

How to provide required beans

The starter requires two beans from your application:

IDatabaseService

The IDatabaseService is typically provided by your Atoti Server application. Most applications already have this bean configured.

IWhatIfPersistenceProperties

Provides Hibernate configuration for simulation persistence. This bean must return a Map<String, String> of Hibernate properties. The properties can be built in any way, such as from a properties file, environment variables, or hardcoded values. Example using an inline map:
Example loading from a properties file:

How to configure properties

Additional configuration is available through atoti.what-if.* properties in your application.yml or application.properties.

Enable/Disable What-If

All What-If features are enabled by default. To disable all What-If auto-configuration:

Security configuration

Distributed mode configuration

See the configuration reference for all available properties.

How to customize auto-configured beans

Any auto-configured bean can be overridden by providing your own bean of the same type. The starter uses @ConditionalOnMissingBean annotations, so your custom beans take precedence. Example: Custom ID generator
Example: Custom security manager

Next steps