Class AppConfig

java.lang.Object
gdv.xport.srv.config.AppConfig
All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration public class AppConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Ueber AppConfig werden einige Konfigurationseinstellungen vorgenommen.
Author:
oliver
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.springframework.http.MediaType
    MediaType fuer CSV.
    static final String
    MediaType als String fuer CSV.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
    Hierueber wird der LogIntercepter registriert.
    void
    configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer)
    Hierueber verknuepfen wir die Endung ".csv" mit dem entsprechenden MediaType.
    void
    configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
    Fuer Content-Negotiationen registrieren wir hier einen eigenen HttpMessageConverter, der die Konvertierung eines Datenpakets in verschiedene Formate wie Text, CSV oder XML unterstuetzt.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    addArgumentResolvers, addCorsMappings, addFormatters, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Field Details

    • TEXT_CSV

      public static final String TEXT_CSV
      MediaType als String fuer CSV.
      See Also:
    • MEDIA_TYPE_TEXT_CSV

      public static final org.springframework.http.MediaType MEDIA_TYPE_TEXT_CSV
      MediaType fuer CSV.
  • Constructor Details

    • AppConfig

      public AppConfig()
  • Method Details

    • addInterceptors

      public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
      Hierueber wird der LogIntercepter registriert.
      Specified by:
      addInterceptors in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      registry - fuer die Registrierung
    • configureMessageConverters

      public void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters)
      Fuer Content-Negotiationen registrieren wir hier einen eigenen HttpMessageConverter, der die Konvertierung eines Datenpakets in verschiedene Formate wie Text, CSV oder XML unterstuetzt.
      Specified by:
      configureMessageConverters in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      converters - Liste mit registrierten Converter
    • configureContentNegotiation

      public void configureContentNegotiation(org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer configurer)
      Hierueber verknuepfen wir die Endung ".csv" mit dem entsprechenden MediaType. Zusammen mit dem DatenpaketHttpMessageConverter sorgt das dafuer, das Datenpakete als CSV zurueckgegeben werden koennen.
      Specified by:
      configureContentNegotiation in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
      Parameters:
      configurer - darueber wird ".csv" als Suffix bekannt gemacht