Class Application

  • All Implemented Interfaces:
    org.springframework.web.WebApplicationInitializer

    @Component
    @ComponentScan(basePackages="africa.absa.inception",
                   lazyInit=true)
    @EnableAsync
    @EnableScheduling
    public abstract class Application
    extends Object
    implements org.springframework.web.WebApplicationInitializer
    The Application class provides the class that all application-specific application classes should be derived from.
    Author:
    Marcus Portmann
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Application​(org.springframework.context.ApplicationContext applicationContext)
      Constructs a new Application.
    • Constructor Detail

      • Application

        protected Application​(org.springframework.context.ApplicationContext applicationContext)
        Constructs a new Application.
        Parameters:
        applicationContext - the Spring application context
    • Method Detail

      • getApplicationContext

        public org.springframework.context.ApplicationContext getApplicationContext()
        Returns the Spring application context.
        Returns:
        the Spring application context
      • objectMapper

        @Bean
        public com.fasterxml.jackson.databind.ObjectMapper objectMapper()
        Returns the Jackson2 object mapper.
        Returns:
        the Jackson2 object mapper
      • onStartup

        public void onStartup​(javax.servlet.ServletContext container)
        Specified by:
        onStartup in interface org.springframework.web.WebApplicationInitializer
      • jackson2ObjectMapperBuilder

        protected org.springframework.http.converter.json.Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder()
        Returns the Jackson2ObjectMapperBuilder bean, which configures the Jackson JSON processor package.
        Returns:
        the Jackson2ObjectMapperBuilder bean, which configures the Jackson JSON processor package
      • messageSource

        @Bean
        protected org.springframework.context.MessageSource messageSource()
        Returns the application message source.
        Returns:
        the application message source
      • metricRegistry

        @Bean
        protected com.codahale.metrics.MetricRegistry metricRegistry()
        Returns the metric registry.
        Returns:
        the metric registry
      • taskExecutor

        @Bean
        protected Executor taskExecutor()
        Returns the Spring task executor to use for @Async method invocations.
        Returns:
        the Spring task executor to use for @Async method invocations
      • taskScheduler

        @Bean
        protected org.springframework.scheduling.TaskScheduler taskScheduler()
        Returns the Spring task scheduler.
        Returns:
        the Spring task scheduler