Skip to content

Add builder for ConnectionFactoryInitializer #313

@mp911de

Description

@mp911de

ConnectionFactoryInitializer follows pretty much the pattern of DataSourceInitializer in the way the class is built. It would make sense to add a streamlined builder to improve configuration experience.

Right now, the initializer would be used as follows:

@Bean
public ConnectionFactoryInitializer initializer(ConnectionFactory connectionFactory) {
	ConnectionFactoryInitializer initializer = new ConnectionFactoryInitializer();
	initializer.setConnectionFactory(connectionFactory);
	initializer.setDatabasePopulator(new ResourceDatabasePopulator(new ClassPathResource("my-schema.sql"), new ClassPathResource("my-data.sql")));

	return initializer;
}

we should allow a streamlined construction that does not rely on setters but guides through the construction and that also helps with scanning resources through a ResourceLoader for script discovery using ant patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions