Class WinnersApplication

java.lang.Object
com.ecom.winners.WinnersApplication

@SpringBootApplication @EnableScheduling @EnableJpaAuditing @EnableBatchProcessing(isolationLevelForCreate="ISOLATION_REPEATABLE_READ") public class WinnersApplication extends Object
Winner application is a Spring Batch application including a single job with three steps. It uses a scheduler which runs weekly to select a lucky winner from a list of users and their transactions that meets a threshold. Annotations:
See Also:
  • SpringBootApplication
  • EnableScheduling
  • EnableJpaAuditing
  • EnableBatchProcessing
  • IsolationLevel
  • Constructor Details

    • WinnersApplication

      public WinnersApplication()
  • Method Details

    • main

      public static void main (String[] args)
    • dataSource

      @Bean public DataSource dataSource()
      Datasource bean is a configuration bean. This bean aims to replace the data source initializer bean from JPA. It can be configured for more customization of connection to data sources. In this case, Postgres database.
      Returns:
      DataSource