Package org.dspace.app.configuration
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResourceHandlers(ResourceHandlerRegistry registry) Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpathorg.thymeleaf.spring6.SpringTemplateEngineConfigure the Thymeleaf template engineorg.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolverConfigure the Thymeleaf template resolverorg.thymeleaf.spring6.view.ThymeleafViewResolverConfigure the Thymeleaf view resolverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addErrorResponseInterceptors, addFormatters, addInterceptors, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Constructor Details
-
OAIWebConfig
public OAIWebConfig()
-
-
Method Details
-
addResourceHandlers
Ensure all resources under src/main/resources/static/ directory are available off the /{oai.path}/static subpath- Specified by:
addResourceHandlersin interfaceWebMvcConfigurer
-
templateResolver
@Bean public org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver templateResolver()Configure the Thymeleaf template resolver -
templateEngine
Configure the Thymeleaf template engine -
viewResolver
Configure the Thymeleaf view resolver -
xoaiItemRepositoryResolver
-