Posts

Showing posts from February, 2019
Create Schema automatically https://stackify.com/spring-boot-level-up/  if you want to add initial data to the database, you can create files with standard names such as  schema.sql, data.sql  or  import.sql  to be picked up automatically by Spring Boot auto-configuration, or you can define your  DataSource bean to load a custom named SQL script manually: @Configuration public class PersistenceConfig { @Bean public DataSource dataSource () { EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder (); EmbeddedDatabase db = builder . setType ( EmbeddedDatabaseType . H2 ) . addScript ( "mySchema.sql" ) . addScript ( "myData.sql" ) . build (); return db ; } } This has the effect of overriding the auto-configured  DataSource  bean, but not the rest of the default beans that make up the configuration of the persistence layer. The entry point for...
Image
https://www.toptal.com/spring/spring-batch-tutorial Batch processing—typified by bulk-oriented, non-interactive, and frequently long running, background execution—is widely used across virtually every industry and is applied to a diverse array of tasks. Batch processing may be data or computationally intensive, execute sequentially or in parallel, and may be initiated through various invocation models, including ad hoc, scheduled, and on-demand. This Spring Batch tutorial explains the programming model and the domain language of batch applications in general and, in particular, shows some useful approaches to the design and development of batch applications using the current  Spring Batch 3.0.7  version. What is Spring Batch? Spring Batch is a lightweight, comprehensive framework designed to facilitate development of robust batch applications. It also provides more advanced technical services and features that support extremely high volume and high performance batc...