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 enum
Standard 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.WebMvcConfigurer
CORS settings and content negotiation configuration.com.fasterxml.jackson.dataformat.xml.XmlMapper
Maps XML to and from objects.org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
Handles the conversion of HTTP request and response bodies to and from JSON.org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter
Handles the conversion of HTTP request and response bodies to and from XML.com.fasterxml.jackson.databind.ObjectMapper
Maps database entities to JSON.org.springframework.web.filter.CommonsRequestLoggingFilter
Logs 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. -
mappingJackson2HttpMessageConverter
@Bean public org.springframework.http.converter.json.MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter()Handles the conversion of HTTP request and response bodies to and from JSON. -
mappingJackson2XmlHttpMessageConverter
@Bean public org.springframework.http.converter.xml.MappingJackson2XmlHttpMessageConverter mappingJackson2XmlHttpMessageConverter()Handles the conversion of HTTP request and response bodies to and from XML. -
customXmlMapper
@Bean(name="customXmlMapper") public com.fasterxml.jackson.dataformat.xml.XmlMapper customXmlMapper()Maps XML to and from objects.
-