Package com.totvs.tjf.autoconfigure
Class JpaSupportAutoConfigure
java.lang.Object
com.totvs.tjf.autoconfigure.JpaSupportAutoConfigure
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@AutoConfigureAfter(org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration.class)
public class JpaSupportAutoConfigure
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Enables the
EnableSpringDataWebSupport and load the
JpaApiModule to register the serializers and deserializers to support
the TOTVS API Guide format for page responses.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJpaSupportAutoConfigure(org.springframework.boot.autoconfigure.data.web.SpringDataWebProperties properties, Optional<Integer> defaultPageSize, Optional<Integer> maximumPageSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers) Adds the customSortArgumentResolverfor standalone resolutions or in conjunction withPageableArgumentResolver.voidaddFormatters(org.springframework.format.FormatterRegistry registry) Adds ZonedDateTime to LocalDate converter in Spring Data projections conversion serviceSetup aJpaApiModuleinstance to be used by the application.Methods 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
addCorsMappings, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Field Details
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- See Also:
-
PAGESIZE
public static final int PAGESIZE- See Also:
-
-
Constructor Details
-
JpaSupportAutoConfigure
-
-
Method Details
-
jpaApiModule
Setup aJpaApiModuleinstance to be used by the application.- Returns:
- standard
SliceJsonSerializerinstance to be used by the application.
-
addArgumentResolvers
public void addArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers) Adds the customSortArgumentResolverfor standalone resolutions or in conjunction withPageableArgumentResolver.Note: Both resolvers are add in preference off the framework default.
- Specified by:
addArgumentResolversin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
addFormatters
public void addFormatters(org.springframework.format.FormatterRegistry registry) Adds ZonedDateTime to LocalDate converter in Spring Data projections conversion service- Specified by:
addFormattersin interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-