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 TypeMethodDescriptionvoid
addArgumentResolvers
(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers) Adds the customSortArgumentResolver
for standalone resolutions or in conjunction withPageableArgumentResolver
.void
addFormatters
(org.springframework.format.FormatterRegistry registry) Adds ZonedDateTime to LocalDate converter in Spring Data projections conversion serviceSetup aJpaApiModule
instance to be used by the application.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 aJpaApiModule
instance to be used by the application.- Returns:
- standard
SliceJsonSerializer
instance to be used by the application.
-
addArgumentResolvers
public void addArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers) Adds the customSortArgumentResolver
for standalone resolutions or in conjunction withPageableArgumentResolver
.Note: Both resolvers are add in preference off the framework default.
- Specified by:
addArgumentResolvers
in 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:
addFormatters
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-