Package gov.niem.tools.api.core.config
Class Config
java.lang.Object
gov.niem.tools.api.core.config.Config
@Configuration
@EnableJpaAuditing(auditorAwareRef="auditor")
@EnableTransactionManagement
public class Config
extends Object
Application configuration settings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStandard supported media types for application responses (JSON, XML). -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.AuditorAware<String> auditor()Enables automatic tracking of users that make database changes.org.springframework.web.servlet.config.annotation.WebMvcConfigurerCORS settings and content negotiation configuration.com.fasterxml.jackson.dataformat.xml.XmlMapperMaps XML to and from objects.com.fasterxml.jackson.databind.ObjectMapperMaps database entities to JSON.org.springframework.web.filter.CommonsRequestLoggingFilterLogs incoming HTTP requests.
-
Field Details
-
BASE_URL
- See Also:
-
baseUrl
-
draft
-
cmfVersion
-
cmfUri
-
cmftoolVersion
-
-
Constructor Details
-
Config
public Config(@Value("${app.baseUrl}") String baseUrl, @Value("${app.draft}") String draft, @Value("${app.cmf.version}") String cmfVersion, @Value("${app.cmf.uri}") String cmfUri, @Value("${app.cmftool.version}") String cmftoolVersion) Sets configuration fields from the application properties file.
-
-
Method Details
-
corsConfigurer
@Bean public org.springframework.web.servlet.config.annotation.WebMvcConfigurer corsConfigurer()CORS settings and content negotiation configuration. -
auditor
Enables automatic tracking of users that make database changes. -
requestLoggingFilter
@Bean public org.springframework.web.filter.CommonsRequestLoggingFilter requestLoggingFilter()Logs incoming HTTP requests. -
objectMapper
@Bean public com.fasterxml.jackson.databind.ObjectMapper objectMapper()Maps database entities to JSON. -
customXmlMapper
@Bean(name="customXmlMapper") public com.fasterxml.jackson.dataformat.xml.XmlMapper customXmlMapper()Maps XML to and from objects.
-