Class OAIWebConfig

  • All Implemented Interfaces:
    org.jtwig.spring.boot.config.JtwigViewResolverConfigurer, org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    @Configuration
    @Import(BasicConfiguration.class)
    @ComponentScan("org.dspace.xoai.controller")
    public class OAIWebConfig
    extends org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
    implements org.jtwig.spring.boot.config.JtwigViewResolverConfigurer
    OAI-PMH webapp configuration. Replaces the old web.xml

    This @Configuration class is automatically discovered by Spring Boot via a @ComponentScan on the org.dspace.app.configuration package.

    Author:
    Tim Donohue
    • Constructor Summary

      Constructors 
      Constructor Description
      OAIWebConfig()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addResourceHandlers​(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
      Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpath
      void configure​(org.jtwig.spring.JtwigViewResolver viewResolver)
      Configure the Jtwig template engine for Spring Boot Ensures Jtwig looks for templates in proper location with proper extension
      ItemRepositoryResolver xoaiItemRepositoryResolver()  
      • Methods inherited from class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter

        addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
    • Constructor Detail

      • OAIWebConfig

        public OAIWebConfig()
    • Method Detail

      • addResourceHandlers

        public void addResourceHandlers​(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
        Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpath
        Specified by:
        addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
        Overrides:
        addResourceHandlers in class org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
      • configure

        public void configure​(org.jtwig.spring.JtwigViewResolver viewResolver)
        Configure the Jtwig template engine for Spring Boot Ensures Jtwig looks for templates in proper location with proper extension
        Specified by:
        configure in interface org.jtwig.spring.boot.config.JtwigViewResolverConfigurer