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.WebApplicationInitializerThe Application class provides the class that all application-specific application classes should be derived from.- Author:
- Marcus Portmann
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedApplication(org.springframework.context.ApplicationContext applicationContext)Constructs a new Application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.context.ApplicationContextgetApplicationContext()Returns the Spring application context.protected org.springframework.http.converter.json.Jackson2ObjectMapperBuilderjackson2ObjectMapperBuilder()Returns the Jackson2ObjectMapperBuilder bean, which configures the Jackson JSON processor package.protected org.springframework.context.MessageSourcemessageSource()Returns the application message source.protected com.codahale.metrics.MetricRegistrymetricRegistry()Returns the metric registry.com.fasterxml.jackson.databind.ObjectMapperobjectMapper()Returns the Jackson2 object mapper.voidonStartup(javax.servlet.ServletContext container)protected ExecutortaskExecutor()Returns the Spring task executor to use for @Async method invocations.protected org.springframework.scheduling.TaskSchedulertaskScheduler()Returns the Spring task scheduler.
-
-
-
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:
onStartupin interfaceorg.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
-
-