Class Application

java.lang.Object
africa.absa.inception.application.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.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.context.ApplicationContext
    Returns the Spring application context.
    protected org.springframework.http.converter.json.Jackson2ObjectMapperBuilder
    Returns the Jackson2ObjectMapperBuilder bean, which configures the Jackson JSON processor package.
    protected org.springframework.context.MessageSource
    Returns the application message source.
    protected com.codahale.metrics.MetricRegistry
    Returns the metric registry.
    com.fasterxml.jackson.databind.ObjectMapper
    Returns the Jackson2 object mapper.
    void
    onStartup(javax.servlet.ServletContext container)
     
    protected Executor
    Returns the Spring task executor to use for @Async method invocations.
    protected org.springframework.scheduling.TaskScheduler
    Returns the Spring task scheduler.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Application

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

    • 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