Package org.dspace.app.configuration
Class OAIWebConfig
- java.lang.Object
-
- org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
-
- org.dspace.app.configuration.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.xmlThis @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 voidaddResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpathvoidconfigure(org.jtwig.spring.JtwigViewResolver viewResolver)Configure the Jtwig template engine for Spring Boot Ensures Jtwig looks for templates in proper location with proper extensionItemRepositoryResolverxoaiItemRepositoryResolver()-
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
-
-
-
-
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:
addResourceHandlersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer- Overrides:
addResourceHandlersin classorg.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:
configurein interfaceorg.jtwig.spring.boot.config.JtwigViewResolverConfigurer
-
xoaiItemRepositoryResolver
@Bean public ItemRepositoryResolver xoaiItemRepositoryResolver()
-
-