问:
Spring Boot & PostgreSQL PostGis invalid stream header: 30313031
I want to use PostGis for fetch locations on my project but the application throws this exception.

2022-12-27 13:12:32.532 ERROR 23709 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize] with root cause

java.io.StreamCorruptedException: invalid stream header: 30313031
    at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:958) ~[na:na]
    at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:392) ~[na:na]
    at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:309) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:299) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:218) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper.deserialize(SerializationHelper.java:287) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:138) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:113) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:29) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:60) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3214) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1887) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.hydrateEntityState(Loader.java:1811) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1784) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRow(Loader.java:1624) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:748) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRowsFromResultSet(Loader.java:1047) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.processResultSet(Loader.java:998) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doQuery(Loader.java:967) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2868) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2850) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.list(Loader.java:2677) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:540) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1459) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.Query.getResultList(Query.java:165) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:76) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:427) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:88) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:289) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:530) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:286) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:640) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:164) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:81) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.23.jar:5.3.23]
    at jdk.proxy2/jdk.proxy2.$Proxy113.findAll(Unknown Source) ~[na:na]
    at com.platronapps.smartshelf.service.impl.TaskServiceImpl.getTaskList(TaskServiceImpl.java:36) ~[classes/:na]
    at com.platronapps.smartshelf.api.TaskHandler.getTaskList(TaskHandler.java:19) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:670) ~[tomcat-embed-core-9.0.68.jar:4.0.FR]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) ~[tomcat-embed-core-9.0.68.jar:4.0.FR]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at com.platronapps.smartshelf.config.jwt.JwtTokenFilter.doFilterInternal(JwtTokenFilter.java:32) ~[classes/:na]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
```
<p>create table script</p>
```CREATE TABLE task
(
    id            BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
    title         VARCHAR(255),
    description   VARCHAR(255),
    public_id     varchar(36),
    task_location geometry,
    CONSTRAINT pk_task PRIMARY KEY (id)
);
```
<p>ps: I also tried this <code>task_location geography(point, 4326)</code></p>
<p>Pom.xml:</p>
<pre class="lang-xml prettyprint-override"><code>    <properties>
        <hibernate-spatial.version>6.1.6.Final</hibernate-spatial.version>
        <jts-core.version>1.19.0</jts-core.version>
        <jackson-datatype-jts.version>2.14</jackson-datatype-jts.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.graphhopper.external</groupId>
            <artifactId>jackson-datatype-jts</artifactId>
            <version>${jackson-datatype-jts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>${jts-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-spatial</artifactId>
            <version>${hibernate-spatial.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
    </dependencies>
</code>```

TaskEntity.java

import lombok.*;
import org.locationtech.jts.geom.Point;

import javax.persistence.*;

@NoArgsConstructor
@AllArgsConstructor
@ToString
@Getter
@Setter
@Builder
@Entity
@Table(name = "task")
public class TaskEntity {

  @Id
  @Column(name = "id")
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @Column(name = "public_id")
  private String publicId;

  @Column(name = "title")
  private String title;

  @Column(name = "description")
  private String description;

  @Column(name = "task_location")
  private Point location;
}
```
<p>ps: I also tried</p>
<pre class="lang-java prettyprint-override"><code>@Column(columnDefinition = "geography(Point,4326)", name = "task_location")
private Point location;
</code>```

applicatin.properties

spring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.PostgisPG95Dialect
spring.jpa.database-platform=org.hibernate.spatial.dialect.PostgisPG95Dialect
```
<p>JacksonConfig.java</p>
<pre class="lang-java prettyprint-override"><code>import com.bedatadriven.jackson.datatype.jts.JtsModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JacksonConfig {
  @Bean
  public JtsModule jtsModule() {
    return new JtsModule();
  }
}
</code>```

TaskRepository.java

import com.platronapps.smartshelf.domain.entity.TaskEntity;
import org.springframework.data.jpa.repository.JpaRepository;

public interface TaskRepository extends JpaRepository<TaskEntity, Long> {
}
```
<p>I used this default method for fetch</p>
```taskRepository.findAll()
```

I discovered that the problem is about version conflict on different questions but I am not sure which I'm missing. So I want to use the last working version. Anyone can help me with this?

Body:
I want to use PostGis for fetch locations on my project but the application throws this exception.

2022-12-27 13:12:32.532 ERROR 23709 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize] with root cause

java.io.StreamCorruptedException: invalid stream header: 30313031
    at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:958) ~[na:na]
    at java.base/java.io.ObjectInputStream.<init>(ObjectInputStream.java:392) ~[na:na]
    at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:309) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:299) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper.doDeserialize(SerializationHelper.java:218) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.util.SerializationHelper.deserialize(SerializationHelper.java:287) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.fromBytes(SerializableTypeDescriptor.java:138) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:113) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.java.SerializableTypeDescriptor.wrap(SerializableTypeDescriptor.java:29) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.sql.VarbinaryTypeDescriptor$2.doExtract(VarbinaryTypeDescriptor.java:60) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:47) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:257) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:243) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:329) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:3214) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1887) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.hydrateEntityState(Loader.java:1811) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1784) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRow(Loader.java:1624) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:748) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.getRowsFromResultSet(Loader.java:1047) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.processResultSet(Loader.java:998) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doQuery(Loader.java:967) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:357) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2868) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.doList(Loader.java:2850) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2682) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.Loader.list(Loader.java:2677) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:540) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:400) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:219) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1459) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1649) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1617) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.Query.getResultList(Query.java:165) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.hibernate.query.criteria.internal.compile.CriteriaQueryTypeQueryAdapter.getResultList(CriteriaQueryTypeQueryAdapter.java:76) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:427) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:88) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:289) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:137) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:121) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:530) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:286) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:640) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:164) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:139) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:81) ~[spring-data-commons-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:174) ~[spring-data-jpa-2.7.5.jar:2.7.5]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.23.jar:5.3.23]
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215) ~[spring-aop-5.3.23.jar:5.3.23]
    at jdk.proxy2/jdk.proxy2.$Proxy113.findAll(Unknown Source) ~[na:na]
    at com.platronapps.smartshelf.service.impl.TaskServiceImpl.getTaskList(TaskServiceImpl.java:36) ~[classes/:na]
    at com.platronapps.smartshelf.api.TaskHandler.getTaskList(TaskHandler.java:19) ~[classes/:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:670) ~[tomcat-embed-core-9.0.68.jar:4.0.FR]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.23.jar:5.3.23]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) ~[tomcat-embed-core-9.0.68.jar:4.0.FR]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:111) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:337) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:115) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:81) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:122) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:116) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:126) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:81) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:109) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:149) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at com.platronapps.smartshelf.config.jwt.JwtTokenFilter.doFilterInternal(JwtTokenFilter.java:32) ~[classes/:na]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) ~[spring-security-web-5.7.4.jar:5.7.4]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.23.jar:5.3.23]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.23.jar:5.3.23]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1789) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.68.jar:9.0.68]
    at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

create table script

CREATE TABLE task
(
    id            BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
    title         VARCHAR(255),
    description   VARCHAR(255),
    public_id     varchar(36),
    task_location geometry,
    CONSTRAINT pk_task PRIMARY KEY (id)
);

ps: I also tried this task_location geography(point, 4326)

Pom.xml:

    <properties>
        <hibernate-spatial.version>6.1.6.Final</hibernate-spatial.version>
        <jts-core.version>1.19.0</jts-core.version>
        <jackson-datatype-jts.version>2.14</jackson-datatype-jts.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.graphhopper.external</groupId>
            <artifactId>jackson-datatype-jts</artifactId>
            <version>${jackson-datatype-jts.version}</version>
        </dependency>
        <dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts-core</artifactId>
            <version>${jts-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-spatial</artifactId>
            <version>${hibernate-spatial.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>
    </dependencies>

TaskEntity.java

import lombok.*;
import org.locationtech.jts.geom.Point;

import javax.persistence.*;

@NoArgsConstructor
@AllArgsConstructor
@ToString
@Getter
@Setter
@Builder
@Entity
@Table(name = "task")
public class TaskEntity {

  @Id
  @Column(name = "id")
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @Column(name = "public_id")
  private String publicId;

  @Column(name = "title")
  private String title;

  @Column(name = "description")
  private String description;

  @Column(name = "task_location")
  private Point location;
}

ps: I also tried

@Column(columnDefinition = "geography(Point,4326)", name = "task_location")
private Point location;

applicatin.properties

spring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.PostgisPG95Dialect
spring.jpa.database-platform=org.hibernate.spatial.dialect.PostgisPG95Dialect

JacksonConfig.java

import com.bedatadriven.jackson.datatype.jts.JtsModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JacksonConfig {
  @Bean
  public JtsModule jtsModule() {
    return new JtsModule();
  }
}

TaskRepository.java

import com.platronapps.smartshelf.domain.entity.TaskEntity;
import org.springframework.data.jpa.repository.JpaRepository;

public interface TaskRepository extends JpaRepository<TaskEntity, Long> {
}

I used this default method for fetch

taskRepository.findAll()

I discovered that the problem is about version conflict on different questions but I am not sure which I'm missing. So I want to use the last working version. Anyone can help me with this?


来源: stackexchange

问:
Test My Restful Web Service in Spring Boot
I'm trying to make a few tests of my CRUD operations in my springboot Restful Web Service, but I can't, because every tutorial I follow ends up with some error !
This time I'm publishing this in order to get some help from you.
My CloudProduct.java

```<code>
package com.proj.my.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

import java.sql.Date;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import jakarta.persistence.Table;

@Entity
@Table(name="cloud_product_info")
@SQLDelete(sql = "UPDATE cloud_product_info SET deleted = true WHERE product_id=?")
@Where(clause = "deleted=false")
//@FilterDef(name="", parameters = @ParamDef(name="isDeleted", type = "boolean"))
//@Filter(name="deletedBookFilter", condition = "deleted = :isDeleted")
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(value = {"createdAt", "updatedAt"},
        allowGetters = true)

public class CloudProduct {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer productId;

    private String productName;
    private Float priceInEuros;
    @CreationTimestamp
    @Column(updatable = false, name = "created_at")
    private Date createdAt;
    private Boolean deleted = Boolean.FALSE;

    @JsonIgnore
    public Boolean getdeleted() {
        return deleted;
    }
    @JsonIgnore
    public void setdeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public CloudProduct(Integer productId, String productName, Float priceInEuros) {
        this.productId = productId;
        this.productName = productName;
        this.priceInEuros = priceInEuros;
    }

    public CloudProduct() {

    }

    public Integer getProductId() {
        return productId;
    }
    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public Float getpriceInEuros() {
        return priceInEuros;
    }
    public void setProductPrice(Float priceInEuros) {
        this.priceInEuros = priceInEuros;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + productId +
                ", name='" + productName + '\'' +
                ", price=" + priceInEuros +
                '}';
    }
}

</code>```

My CloudProductController

```<code>package com.proj.my.controller;

import java.util.List;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.proj.my.model.CloudProduct;
import com.proj.my.service.CloudProductService;

@RestController
@RequestMapping("/cloudproduct")

public class CloudProductController
{

    CloudProductService cloudProductService;

    public CloudProductController(CloudProductService cloudProductService)
    {
        this.cloudProductService = cloudProductService;
    }

    @GetMapping("{productId}")
    public CloudProduct getCloudProductDetails(@PathVariable("productId") Integer productId){
        return cloudProductService.getCloudProduct(productId);
    }

    @GetMapping("getAll")
    public List<CloudProduct> getCloudProductDetails(){
        return cloudProductService.getCloudProducts();
    }

    @PostMapping
    public String createCloudProductDetails(@RequestBody CloudProduct cloudProduct){

        cloudProductService.createCloudProduct(cloudProduct);
        return "Success";
    }

    @PutMapping
    public CloudProduct updateCloudProductDetails(@RequestBody CloudProduct cloudProduct){

        return cloudProductService.updateCloudProduct(cloudProduct);
    }

    @DeleteMapping("{productId}")
    public String deleteCloudProductDetails(@PathVariable("productId")Integer productId){

        cloudProductService.deleteCloudProduct(productId);
        return "Deleted!";
    }

}

</code>```

My CloudProductServiceImpl.java

```<code>package com.proj.my.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.proj.my.model.CloudProduct;
import com.proj.my.repository.CloudProductRepository;
import com.proj.my.service.CloudProductService;

@Service
public class CloudProductServiceImpl implements CloudProductService
{

    CloudProductRepository cloudProductRepository;

    public CloudProductServiceImpl(CloudProductRepository cloudProductRepository) {

        this.cloudProductRepository = cloudProductRepository;

    }

    @Override
    public String createCloudProduct(CloudProduct cloudProduct){
        cloudProductRepository.save(cloudProduct);
        return "Success";
    }

    @Override
    public CloudProduct updateCloudProduct(CloudProduct cloudProduct){
        CloudProduct existingCloudProductDetails = getCloudProduct(cloudProduct.getProductId());

        if(cloudProduct.getProductName() != null){
            existingCloudProductDetails.setProductName(cloudProduct.getProductName());
        }

        if(cloudProduct.getpriceInEuros() != null){
            existingCloudProductDetails.setProductPrice(cloudProduct.getpriceInEuros());
        }

        return cloudProductRepository.save(existingCloudProductDetails);
    }

    @Override
    public CloudProduct getCloudProduct(Integer cloudProductId){
        return cloudProductRepository.findById(cloudProductId).get();
    }

    @Override
    public String deleteCloudProduct(Integer cloudProductId){
        cloudProductRepository.deleteById(cloudProductId);
        return "Success";
    }

    @Override
    public List<CloudProduct> getCloudProducts()
    {
        return cloudProductRepository.findAll();
    }

}

</code>```

My CloudProductService.java

```<code>package com.proj.my.service;

import java.util.List;

import com.proj.my.model.CloudProduct;

public interface CloudProductService {

    public String createCloudProduct(CloudProduct cloudProduct);
    public CloudProduct updateCloudProduct(CloudProduct cloudProduct);
    public String deleteCloudProduct(Integer cloudProductId);
    public CloudProduct getCloudProduct(Integer cloudProductId);
    public List<CloudProduct> getCloudProducts();
}

</code>```

My cloudProductRepository.java

```<code>package com.proj.my.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import com.proj.my.model.CloudProduct;

public interface CloudProductRepository extends JpaRepository<CloudProduct, Integer> {

}
</code>```

And finally, my CloudProductControllerTest.java

```<code>package com.proj.my.service.impl;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import com.proj.my.controller.CloudProductController;
import com.proj.my.model.CloudProduct;
import com.proj.my.repository.CloudProductRepository;
import com.proj.my.service.CloudProductService;
import java.util.ArrayList;

import java.util.List;

@WebMvcTest(CloudProductController.class)
public class CloudProductControllerTest {

    @Autowired
    private MockMvc mockMvc;

    @Autowired
    private ObjectMapper objectMapper;

    @MockBean
    private CloudProductRepository cloudProductRepository;

    @MockBean
    private CloudProductService cloudProductService;

    @Test
    public void testgetCloudProductDetails() throws Exception{
        List<CloudProduct> productList = new ArrayList<>();
        productList.add(new CloudProduct(1, "Maria", (float) 232));
        productList.add(new CloudProduct(2, "Maria", (float) 232));
        Mockito.when(cloudProductRepository.findAll()).thenReturn(productList);

        String url = "";
        mockMvc.perform(get(url)).andExpect(status().isOk());
        String actualJsonResponse = mvcResult.getResponse().getContentAsString();
        System.out.println(actualJsonResponse);

        String expectedJsonResponse = objectMapper.writeValueAsString(productList);
        System.out.println(expectedJsonResponse);
        assertEquals(actualJsonResponse, expectedJsonResponse);

    }
}

</code>```

And this test is wrong, because the expected here is "[]" and I'm getting " [{"productId":1,"productName":"Maria","priceInEuros":232.0,"createdAt":null},{"productId":2,"productName":"Maria","priceInEuros":232.0,"createdAt":null}]" which is correct... the expected is null, why ?

ContentLicense: CC BY-SA 4.0

Body:
I'm trying to make a few tests of my CRUD operations in my springboot Restful Web Service, but I can't, because every tutorial I follow ends up with some error !
This time I'm publishing this in order to get some help from you.
My CloudProduct.java

package com.proj.my.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

import java.sql.Date;

import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import jakarta.persistence.Table;

@Entity
@Table(name="cloud_product_info")
@SQLDelete(sql = "UPDATE cloud_product_info SET deleted = true WHERE product_id=?")
@Where(clause = "deleted=false")
//@FilterDef(name="", parameters = @ParamDef(name="isDeleted", type = "boolean"))
//@Filter(name="deletedBookFilter", condition = "deleted = :isDeleted")
@EntityListeners(AuditingEntityListener.class)
@JsonIgnoreProperties(value = {"createdAt", "updatedAt"},
        allowGetters = true)

public class CloudProduct {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer productId;

    private String productName;
    private Float priceInEuros;
    @CreationTimestamp
    @Column(updatable = false, name = "created_at")
    private Date createdAt;
    private Boolean deleted = Boolean.FALSE;

    @JsonIgnore
    public Boolean getdeleted() {
        return deleted;
    }
    @JsonIgnore
    public void setdeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public CloudProduct(Integer productId, String productName, Float priceInEuros) {
        this.productId = productId;
        this.productName = productName;
        this.priceInEuros = priceInEuros;
    }

    public CloudProduct() {

    }

    public Integer getProductId() {
        return productId;
    }
    public void setProductId(Integer productId) {
        this.productId = productId;
    }
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public Float getpriceInEuros() {
        return priceInEuros;
    }
    public void setProductPrice(Float priceInEuros) {
        this.priceInEuros = priceInEuros;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + productId +
                ", name='" + productName + '\'' +
                ", price=" + priceInEuros +
                '}';
    }
}

My CloudProductController

package com.proj.my.controller;

import java.util.List;

import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.proj.my.model.CloudProduct;
import com.proj.my.service.CloudProductService;

@RestController
@RequestMapping("/cloudproduct")

public class CloudProductController
{

    CloudProductService cloudProductService;

    public CloudProductController(CloudProductService cloudProductService)
    {
        this.cloudProductService = cloudProductService;
    }

    @GetMapping("{productId}")
    public CloudProduct getCloudProductDetails(@PathVariable("productId") Integer productId){
        return cloudProductService.getCloudProduct(productId);
    }

    @GetMapping("getAll")
    public List<CloudProduct> getCloudProductDetails(){
        return cloudProductService.getCloudProducts();
    }

    @PostMapping
    public String createCloudProductDetails(@RequestBody CloudProduct cloudProduct){

        cloudProductService.createCloudProduct(cloudProduct);
        return "Success";
    }

    @PutMapping
    public CloudProduct updateCloudProductDetails(@RequestBody CloudProduct cloudProduct){

        return cloudProductService.updateCloudProduct(cloudProduct);
    }

    @DeleteMapping("{productId}")
    public String deleteCloudProductDetails(@PathVariable("productId")Integer productId){

        cloudProductService.deleteCloudProduct(productId);
        return "Deleted!";
    }

}

My CloudProductServiceImpl.java

package com.proj.my.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.proj.my.model.CloudProduct;
import com.proj.my.repository.CloudProductRepository;
import com.proj.my.service.CloudProductService;

@Service
public class CloudProductServiceImpl implements CloudProductService
{

    CloudProductRepository cloudProductRepository;

    public CloudProductServiceImpl(CloudProductRepository cloudProductRepository) {

        this.cloudProductRepository = cloudProductRepository;

    }

    @Override
    public String createCloudProduct(CloudProduct cloudProduct){
        cloudProductRepository.save(cloudProduct);
        return "Success";
    }

    @Override
    public CloudProduct updateCloudProduct(CloudProduct cloudProduct){
        CloudProduct existingCloudProductDetails = getCloudProduct(cloudProduct.getProductId());

        if(cloudProduct.getProductName() != null){
            existingCloudProductDetails.setProductName(cloudProduct.getProductName());
        }

        if(cloudProduct.getpriceInEuros() != null){
            existingCloudProductDetails.setProductPrice(cloudProduct.getpriceInEuros());
        }

        return cloudProductRepository.save(existingCloudProductDetails);
    }

    @Override
    public CloudProduct getCloudProduct(Integer cloudProductId){
        return cloudProductRepository.findById(cloudProductId).get();
    }

    @Override
    public String deleteCloudProduct(Integer cloudProductId){
        cloudProductRepository.deleteById(cloudProductId);
        return "Success";
    }

    @Override
    public List<CloudProduct> getCloudProducts()
    {
        return cloudProductRepository.findAll();
    }

}

My CloudProductService.java

package com.proj.my.service;

import java.util.List;

import com.proj.my.model.CloudProduct;

public interface CloudProductService {

    public String createCloudProduct(CloudProduct cloudProduct);
    public CloudProduct updateCloudProduct(CloudProduct cloudProduct);
    public String deleteCloudProduct(Integer cloudProductId);
    public CloudProduct getCloudProduct(Integer cloudProductId);
    public List<CloudProduct> getCloudProducts();
}

My cloudProductRepository.java

package com.proj.my.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import com.proj.my.model.CloudProduct;

public interface CloudProductRepository extends JpaRepository<CloudProduct, Integer> {

}

And finally, my CloudProductControllerTest.java

package com.proj.my.service.impl;

import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.web.servlet.MockMvc;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import com.proj.my.controller.CloudProductController;
import com.proj.my.model.CloudProduct;
import com.proj.my.repository.CloudProductRepository;
import com.proj.my.service.CloudProductService;
import java.util.ArrayList;

import java.util.List;

@WebMvcTest(CloudProductController.class)
public class CloudProductControllerTest {

    @Autowired
    private MockMvc mockMvc;

    @Autowired
    private ObjectMapper objectMapper;

    @MockBean
    private CloudProductRepository cloudProductRepository;

    @MockBean
    private CloudProductService cloudProductService;

    @Test
    public void testgetCloudProductDetails() throws Exception{
        List<CloudProduct> productList = new ArrayList<>();
        productList.add(new CloudProduct(1, "Maria", (float) 232));
        productList.add(new CloudProduct(2, "Maria", (float) 232));
        Mockito.when(cloudProductRepository.findAll()).thenReturn(productList);

        String url = "";
        mockMvc.perform(get(url)).andExpect(status().isOk());
        String actualJsonResponse = mvcResult.getResponse().getContentAsString();
        System.out.println(actualJsonResponse);

        String expectedJsonResponse = objectMapper.writeValueAsString(productList);
        System.out.println(expectedJsonResponse);
        assertEquals(actualJsonResponse, expectedJsonResponse);

    }
}

And this test is wrong, because the expected here is "[]" and I'm getting " [{"productId":1,"productName":"Maria","priceInEuros":232.0,"createdAt":null},{"productId":2,"productName":"Maria","priceInEuros":232.0,"createdAt":null}]" which is correct... the expected is null, why ?


问:
How to send packet to every one on docker network using sockets (Python)
I have three containers which all on the same network. each one of them has a differet IP address but all exposed on port 80. two of the containers opens socket using python and start listening on their IP address and on port 80. the third container supposed to connect to thir socket and send a packet. I have been able to send each one of them a packet with thir IP and PORT, but my end goal his to send them a packet without specifying thir IP's upfront and send the packet to all of the containers on the network.

What I tried:

I tried using 0.0.0.0 and 255.255.255.255 as the ip but that do not working. I also tried running a docker command that gets me all of the IP's on the network using subprocess but it says that I do not have docker installed on the container.

Does someone knows how can I do it?.

this is my third containers:

```<code>import socket

def main():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
        sock.connect(("255.255.255.255", 80)) # here I want to connect and send all of the containers a packet
        sock.sendall(b'Hey there!.')

if __name__ == "__main__":
    main()
</code>```

This is how both of the other contaienrs look like just listeing on different IP's

```<code>import socket

def main():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
        sock.bind(("10.0.0.2", 80))
        sock.listen(1)
        print(f'tester1 started listeing on port {80}')
        client, addr = sock.accept()
        msg = client.recv(1024)
        print(msg.decode())

if __name__ == "__main__":
    main()
</code>```

Note: I a running them using dokcer-compose

Body:
I have three containers which all on the same network. each one of them has a differet IP address but all exposed on port 80. two of the containers opens socket using python and start listening on their IP address and on port 80. the third container supposed to connect to thir socket and send a packet. I have been able to send each one of them a packet with thir IP and PORT, but my end goal his to send them a packet without specifying thir IP's upfront and send the packet to all of the containers on the network.

What I tried:

I tried using 0.0.0.0 and 255.255.255.255 as the ip but that do not working. I also tried running a docker command that gets me all of the IP's on the network using subprocess but it says that I do not have docker installed on the container.

Does someone knows how can I do it?.

this is my third containers:

import socket

def main():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
        sock.connect(("255.255.255.255", 80)) # here I want to connect and send all of the containers a packet
        sock.sendall(b'Hey there!.')

if __name__ == "__main__":
    main()

This is how both of the other contaienrs look like just listeing on different IP's

import socket

def main():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
        sock.bind(("10.0.0.2", 80))
        sock.listen(1)
        print(f'tester1 started listeing on port {80}')
        client, addr = sock.accept()
        msg = client.recv(1024)
        print(msg.decode())

if __name__ == "__main__":
    main()

Note: I a running them using dokcer-compose


问:
I could not get print() and debugPrint() value during Flutter test at gitlab ci
I put this code in flutter app.

```<code>if (Platform.environment.containsKey('FLUTTER_TEST')) {
debugPrint('test-text');
}
</code>```

then I ran flutter test on gitlab CI.

```<code>flutter test -r json > result.json
</code>```

I expected I could get Flutter test results and this debugPrint information but I could get it.
Do you know how to get print info at gitlab

Body:
I put this code in flutter app.

if (Platform.environment.containsKey('FLUTTER_TEST')) {
debugPrint('test-text');
}

then I ran flutter test on gitlab CI.

flutter test -r json > result.json

I expected I could get Flutter test results and this debugPrint information but I could get it.
Do you know how to get print info at gitlab


问:
Error: request for './chunk-D2K5YHXV.mjs' is not in cache
Getting this error while running nextjs app on my local machine

package.json

```<code>{
  "dependencies": {
    "@chakra-ui/react": "^2.4.3",
    "@emotion/react": "^11.10.5",
    "@emotion/styled": "^11.10.5",
    "@pinata/sdk": "^2.1.0",
    "@rainbow-me/rainbowkit": "^0.6.1",
    "antd": "^5.0.4",
    "axios": "^1.0.0",
    "draft-js": "^0.11.7",
    "ethers": "^5.7.1",
    "file-saver": "^2.0.5",
    "formik": "^2.2.9",
    "framer-motion": "^6.5.1",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "next": "13.1.1",
    "react": "18.2.0",
    "react-datepicker": "^4.8.0",
    "react-dom": "18.2.0",
    "react-icon": "^1.0.0",
    "react-icons": "^4.4.0",
    "react-lottie-player": "^1.5.0",
    "react-select": "^5.7.0",
    "react-toastify": "^9.0.8",
    "styled-components": "^5.3.5",
    "use-file-picker": "^1.5.1",
    "uuid": "^9.0.0",
    "uuidv4": "^6.2.13",
    "wagmi": "^0.6.7",
    "yup": "^0.32.11"
  }
}
</code>```

I deleted node_modules and lock file then tried again but still getting same error. I also tried uisng npm but got same error

Body:
Getting this error while running nextjs app on my local machine

package.json

{
  "dependencies": {
    "@chakra-ui/react": "^2.4.3",
    "@emotion/react": "^11.10.5",
    "@emotion/styled": "^11.10.5",
    "@pinata/sdk": "^2.1.0",
    "@rainbow-me/rainbowkit": "^0.6.1",
    "antd": "^5.0.4",
    "axios": "^1.0.0",
    "draft-js": "^0.11.7",
    "ethers": "^5.7.1",
    "file-saver": "^2.0.5",
    "formik": "^2.2.9",
    "framer-motion": "^6.5.1",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "next": "13.1.1",
    "react": "18.2.0",
    "react-datepicker": "^4.8.0",
    "react-dom": "18.2.0",
    "react-icon": "^1.0.0",
    "react-icons": "^4.4.0",
    "react-lottie-player": "^1.5.0",
    "react-select": "^5.7.0",
    "react-toastify": "^9.0.8",
    "styled-components": "^5.3.5",
    "use-file-picker": "^1.5.1",
    "uuid": "^9.0.0",
    "uuidv4": "^6.2.13",
    "wagmi": "^0.6.7",
    "yup": "^0.32.11"
  }
}

I deleted node_modules and lock file then tried again but still getting same error. I also tried uisng npm but got same error


问:
WPF storyboard animation changes multiple UI objects instead of one

The issue

Moving styles file injection from App.xaml to view breaks animations. Instead of changing a specific element, it changes all the items with the same datatemplate.

Setup

Style.xaml:

```<code><ResourceDictionary .....>

    <Style x:Key="Style"
           TargetType="{x:Type Path}">
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Viewbox}}}"
                         Value="True">
                <Setter Property="Fill" Value="Orange" /> <----- works as expected, changes the object that is hovered
                <DataTrigger.EnterActions>
                    <BeginStoryboard>
                        <Storyboard> <----- not as expected, changes all DataModel datatemplates there is
                             <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX"
                                                     Duration="0:0:0.2"
                                                     To="2.33" />
                             <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY"
                                                     Duration="0:0:0.2"
                                                     To="2.33" />
                        </Storyboard>
                    </BeginStoryboard>
                </DataTrigger.EnterActions>
                <DataTrigger.ExitActions>
                    <!-- omitted, returns the default value -->
                </DataTrigger.ExitActions>
            </DataTrigger>
        </Style.Triggers>
    </Style>

   <DataTemplate DataType="{x:Type DataModel}">
        <Viewbox>
            <Canvas Width="{Binding InitialWidth}"
                    Height="{Binding InitialHeight}">
                <Canvas>
                    <Path Opacity="0.2"
                          x:Name="circle"
                          RenderTransform="{StaticResource DefaultScale}"
                          Style="{StaticResource Style}">   <---- the style in question
                        <Path.Data>
                            <EllipseGeometry RadiusX="{Binding Radius}"
                                             RadiusY="{Binding Radius}" />
                        </Path.Data>
                    </Path>
                <Canvas>
            </Canvas>
        </Viewbox>
    </DataTemplate>
</ResourceDictionary>
</code>```

MyView.xaml where style is used is UserControl all DataModel objects are under ItemsControl if that makes any difference.

```<code><UserControl>
    <ItemsControl VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  ItemsSource="{Binding Items}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <Canvas />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemContainerStyle>
            <Style TargetType="ContentPresenter">
                <Setter Property="Canvas.Left"
                        Value="{Binding LeftOffset}" />
                <Setter Property="Canvas.Top"
                        Value="{Binding TopOffset}" />
            </Style>
        </ItemsControl.ItemContainerStyle>
    </ItemsControl>
</UserControl>
</code>```

The sole change

The issue appears when moving <ResourceDictionary Source="Style.xaml" /> from App.xaml:

```<code><Application>
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Style.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
</code>```

to MyView.xaml

```<code><UserControl>
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Style.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
</UserControl>
</code>```

Body:
The issue

Moving styles file injection from App.xaml to view breaks animations. Instead of changing a specific element, it changes all the items with the same datatemplate.

Setup

Style.xaml:

<ResourceDictionary .....>

    </Style>

   <DataTemplate DataType="{x:Type DataModel}">
        <Viewbox>
            <Canvas Width="{Binding InitialWidth}"
                    Height="{Binding InitialHeight}">
                <Canvas>
                    <Path Opacity="0.2"
                          x:Name="circle"
                          RenderTransform="{StaticResource DefaultScale}"
                          Style="{StaticResource Style}">   <---- the style in question
                        <Path.Data>
                            <EllipseGeometry RadiusX="{Binding Radius}"
                                             RadiusY="{Binding Radius}" />
                        </Path.Data>
                    </Path>
                <Canvas>
            </Canvas>
        </Viewbox>
    </DataTemplate>
</ResourceDictionary>

MyView.xaml where style is used is UserControl all DataModel objects are under ItemsControl if that makes any difference.

<UserControl>
    <ItemsControl VerticalAlignment="Center"
                  HorizontalAlignment="Center"
                  ItemsSource="{Binding Items}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <Canvas />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
        <ItemsControl.ItemContainerStyle>

        </ItemsControl.ItemContainerStyle>
    </ItemsControl>
</UserControl>

The sole change

The issue appears when moving <ResourceDictionary Source="Style.xaml" /> from App.xaml:

<Application>
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Style.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

to MyView.xaml

<UserControl>
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Style.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
</UserControl>


问:
redux-dynamic-modules with type script error on DynamicModuleLoader
I am try to use redux-dynamic-modules with typescript. It shows this error. can some one help me.

I implemented this with javascript. github link. But when I try to convert this to type script I am in a trouble.

This is the redux-dynamic-modules documentation

and also I wrote a alternative solution for use my project. can some one say is this have any side effect or can someone give idea to improve this code - repo link

this is the store.ts file

```<code>export const store: IModuleStore<any> = createStore(
    {
        initialState: {},
    },

);
</code>```

this is authSlice.ts file

```<code>export type KeycloakInfo = {isAuthenticated: boolean, token: string, realm: string}

//realms defined in keycloak
export const realms = ['aaa', 'bbb'];

const initialState = {
    isAuth: false,
    keycloakInfo: { isAuthenticated: false, token: '', realm: '' }
}

const authSlice = createSlice({
    name: 'auth',
    initialState,
    reducers: {
        setAuth: (state, action: PayloadAction<KeycloakInfo>) => {
           state.isAuth = !state.isAuth;
           state.keycloakInfo = action.payload
       }
    }
})

export const { setAuth } = authSlice.actions;

export default authSlice.reducer;
</code>```

this is the authModule.ts file

```<code>import { IModule } from "redux-dynamic-modules";

import authSlice from "../features/authSlice";

export const AuthModule: IModule<any> = {
    id: "auth",
    reducerMap: {
        auth: authSlice,
    },

};
</code>```

when I try to call the DynamicModuleLoader it shows

```<code>import {store as rootStore} from "/shared-state/store";
import  {AuthModule} from "/shell/authentication";
import { Provider } from 'react-redux';
import { DynamicModuleLoader } from 'redux-dynamic-modules';

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <Provider store={rootStore}>
    <DynamicModuleLoader modules={[AuthModule]}>
      <App />
    </DynamicModuleLoader>
  </Provider>
);
</code>```

Body:
I am try to use redux-dynamic-modules with typescript. It shows this error. can some one help me.

I implemented this with javascript. github link. But when I try to convert this to type script I am in a trouble.

This is the redux-dynamic-modules documentation

and also I wrote a alternative solution for use my project. can some one say is this have any side effect or can someone give idea to improve this code - repo link

this is the store.ts file

export const store: IModuleStore<any> = createStore(
    {
        initialState: {},
    },

);

this is authSlice.ts file

export type KeycloakInfo = {isAuthenticated: boolean, token: string, realm: string}

//realms defined in keycloak
export const realms = ['aaa', 'bbb'];

const initialState = {
    isAuth: false,
    keycloakInfo: { isAuthenticated: false, token: '', realm: '' }
}

const authSlice = createSlice({
    name: 'auth',
    initialState,
    reducers: {
        setAuth: (state, action: PayloadAction<KeycloakInfo>) => {
           state.isAuth = !state.isAuth;
           state.keycloakInfo = action.payload
       }
    }
})

export const { setAuth } = authSlice.actions;

export default authSlice.reducer;

this is the authModule.ts file

import { IModule } from "redux-dynamic-modules";

import authSlice from "../features/authSlice";

export const AuthModule: IModule<any> = {
    id: "auth",
    reducerMap: {
        auth: authSlice,
    },

};

when I try to call the DynamicModuleLoader it shows

import {store as rootStore} from "/shared-state/store";
import  {AuthModule} from "/shell/authentication";
import { Provider } from 'react-redux';
import { DynamicModuleLoader } from 'redux-dynamic-modules';

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <Provider store={rootStore}>
    <DynamicModuleLoader modules={[AuthModule]}>
      <App />
    </DynamicModuleLoader>
  </Provider>
);


问:
Firebase Auth Modal Error when User cancels the Modal
So I have this problem with Firebase Popup, if the user cancels the modal and doesn't chose to continue I get this weird modal that is showing this error:

Here is the code:

```<code>import { FirebaseAuth } from "../config/Firebase";
import { GoogleAuthProvider, signInWithPopup, getAdditionalUserInfo } from "firebase/auth";
import { Notifier } from "../utils";

import { USER_AUTH_ERROR } from "../config/Responders";

const Google = async (Register, Login, dispatch) => {
  var Provider = new GoogleAuthProvider();
  const data = await signInWithPopup(FirebaseAuth, Provider);

  try {
    if (data) {
      const user = data.user;
      const additionalUserInfo = getAdditionalUserInfo(data);

      if (additionalUserInfo.isNewUser) {
        const name = user.displayName.split(" ");
        const firstName = name[0] || "";
        const lastName = name[1] || "";

        const config = {
          variables: {
            createUserInput: {
              Name: firstName,
              Surname: lastName,
              Email: user.email,
              Avatar: user.photoURL || null,
              Uid: user.uid,
            },
          },
        };

        Register(config);
      }

      else {
        const config = {
          variables: {
            uid: user.uid,
          },
        };

        Login(config);
      }
    }

    else Notifier(dispatch, USER_AUTH_ERROR, `error`);
  } catch (error) {
    Notifier(dispatch, USER_AUTH_ERROR, `error`);
  }
};

export default Google;
</code>```

So there should be a way to remove this error, as is not an error, just user decided to not auth to the platform?

Body:
So I have this problem with Firebase Popup, if the user cancels the modal and doesn't chose to continue I get this weird modal that is showing this error:

Here is the code:

import { FirebaseAuth } from "../config/Firebase";
import { GoogleAuthProvider, signInWithPopup, getAdditionalUserInfo } from "firebase/auth";
import { Notifier } from "../utils";

import { USER_AUTH_ERROR } from "../config/Responders";

const Google = async (Register, Login, dispatch) => {
  var Provider = new GoogleAuthProvider();
  const data = await signInWithPopup(FirebaseAuth, Provider);

  try {
    if (data) {
      const user = data.user;
      const additionalUserInfo = getAdditionalUserInfo(data);

      if (additionalUserInfo.isNewUser) {
        const name = user.displayName.split(" ");
        const firstName = name[0] || "";
        const lastName = name[1] || "";

        const config = {
          variables: {
            createUserInput: {
              Name: firstName,
              Surname: lastName,
              Email: user.email,
              Avatar: user.photoURL || null,
              Uid: user.uid,
            },
          },
        };

        Register(config);
      }

      else {
        const config = {
          variables: {
            uid: user.uid,
          },
        };

        Login(config);
      }
    }

    else Notifier(dispatch, USER_AUTH_ERROR, `error`);
  } catch (error) {
    Notifier(dispatch, USER_AUTH_ERROR, `error`);
  }
};

export default Google;

So there should be a way to remove this error, as is not an error, just user decided to not auth to the platform?