Class OAIWebConfig

java.lang.Object
org.dspace.app.configuration.OAIWebConfig
All Implemented Interfaces:
WebMvcConfigurer

@Configuration @Import(BasicConfiguration.class) @ComponentScan("org.dspace.xoai.controller") public class OAIWebConfig extends Object implements WebMvcConfigurer
OAI-PMH webapp configuration. Replaces the old web.xml. This webapp used JTwig in earlier versions and has been refactored to use Thymeleaf instead.

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

Author:
Kim Shepherd
  • Constructor Details

    • OAIWebConfig

      public OAIWebConfig()
  • Method Details

    • addResourceHandlers

      public void addResourceHandlers(ResourceHandlerRegistry registry)
      Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpath
      Specified by:
      addResourceHandlers in interface WebMvcConfigurer
    • templateResolver

      @Bean public org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver templateResolver()
      Configure the Thymeleaf template resolver
    • templateEngine

      @Bean public org.thymeleaf.spring6.SpringTemplateEngine templateEngine()
      Configure the Thymeleaf template engine
    • viewResolver

      @Bean public org.thymeleaf.spring6.view.ThymeleafViewResolver viewResolver()
      Configure the Thymeleaf view resolver
    • xoaiItemRepositoryResolver

      @Bean public ItemRepositoryResolver xoaiItemRepositoryResolver()