88
99/**
1010 * ConfigBootstrap is a utility class that initializes and configures the core components of the LevelingCore system.
11- * This includes loading configuration settings, setting up database connections, initializing the leveling formula,
12- * and creating a level service for managing levels and experience points (XP).
11+ * This includes loading configuration settings, setting up database connections, initializing the leveling formula, and
12+ * creating a level service for managing levels and experience points (XP).
1313 * <p>
1414 * This class cannot be instantiated and provides a static method to bootstrap the system.
1515 */
@@ -18,16 +18,19 @@ public final class ConfigBootstrap {
1818 private ConfigBootstrap () {}
1919
2020 /**
21- * Record Bootstrap is a utility data holder used during the initialization of the LevelingCore system.
22- * It encapsulates core parts necessary for the functionality of the leveling system. The record is
23- * primarily designed to simplify the return of multiple related objects from the bootstrap process.
21+ * Record Bootstrap is a utility data holder used during the initialization of the LevelingCore system. It
22+ * encapsulates core parts necessary for the functionality of the leveling system. The record is primarily designed
23+ * to simplify the return of multiple related objects from the bootstrap process.
2424 */
25- public record Bootstrap (LevelService service , AutoCloseable closeable ) {}
25+ public record Bootstrap (
26+ LevelService service ,
27+ AutoCloseable closeable
28+ ) {}
2629
2730 /**
2831 * Initializes and configures the essential parts of the LevelingCore system. This method sets up the leveling
29- * formula, loads configuration settings, establishes a database connection, and prepares the leveling service.
30- * It also handles any necessary migration of XP formulas when specified in the configuration.
32+ * formula, loads configuration settings, establishes a database connection, and prepares the leveling service. It
33+ * also handles any necessary migration of XP formulas when specified in the configuration.
3134 *
3235 * @return A {@code Bootstrap} record containing the initialized {@code LevelService} and a {@code closeable}
3336 * resource for managing the cleanup of associated resources.
@@ -37,10 +40,10 @@ public static Bootstrap bootstrap() {
3740 var formulaDescriptor = LevelFormulaFactory .descriptorFromConfig (config );
3841 var formula = LevelFormulaFactory .fromConfig (config );
3942 var ds = DataSourceFactory .create (
40- config .database .jdbcUrl ,
41- config .database .username ,
42- config .database .password ,
43- config .database .maxPoolSize
43+ config .database .jdbcUrl ,
44+ config .database .username ,
45+ config .database .password ,
46+ config .database .maxPoolSize
4447 );
4548 var repo = new JdbcLevelRepository (ds );
4649
0 commit comments