Getting Started
This section provides guidance on setting up your environment and developing with Atoti What-If.
Quick start
The fastest way to get started with Atoti What-If is using the Spring Boot Starter.
Prerequisites
- Java 21 or later
- Spring Boot 3.x
- Atoti Server 6.1.x
Add the dependency
<dependency>
<groupId>com.activeviam.apps</groupId>
<artifactId>atoti-what-if-spring-boot-starter</artifactId>
<version>5.0.0-AS6.1</version>
</dependency>
Required beans
The starter auto-configures all What-If components but requires two beans from your application:
IDatabaseService- provided by your Atoti Server applicationIWhatIfPersistenceProperties- provides Hibernate configuration for persistence
Example persistence properties bean:
@Bean
public IWhatIfPersistenceProperties whatIfPersistenceProperties() {
return () -> Map.of(
"hibernate.hbm2ddl.auto", "update",
"hibernate.connection.url", "jdbc:h2:mem:submissions;DB_CLOSE_DELAY=-1",
"hibernate.connection.driver_class", "org.h2.Driver",
"hibernate.dialect", "org.hibernate.dialect.H2Dialect",
"hibernate.default_schema", "submissions"
);
}
Additional configuration options are available through atoti.what-if.* properties. See the configuration reference for details.
Next steps
- Spring Boot Starter setup guide for step-by-step instructions
- Configuration reference for all available properties
- Customize auto-configured beans to override defaults
- Implementation example for detailed configuration options
- Components to understand the library structure