Skip to content

Instantly share code, notes, and snippets.

@kamalhm
Created January 10, 2021 18:09
Show Gist options
  • Save kamalhm/ea8bb6333e9d52441c21438009d4e916 to your computer and use it in GitHub Desktop.
Save kamalhm/ea8bb6333e9d52441c21438009d4e916 to your computer and use it in GitHub Desktop.
@Bean
ConnectionFactoryInitializer initializer(@Qualifier("connectionFactory") ConnectionFactory connectionFactory) {
ConnectionFactoryInitializer initializer = new ConnectionFactoryInitializer();
initializer.setConnectionFactory(connectionFactory);
ResourceDatabasePopulator resource =
new ResourceDatabasePopulator(new ClassPathResource("schema.sql"));
initializer.setDatabasePopulator(resource);
return initializer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment