blade-gateway引入blade-starter-redis包,通过bladeRedis操作的数据都是未经过序列化的

Blade 未结 1 1862
Manning
Manning 剑童 2020-07-13 17:32

一、该问题的重现步骤是什么?

1. blade-gateway引入blade-starter-redis包,通过bladeRedis操作的数据都是未经过序列化的,导致获取其他模块经过序列化后的数据,拿不到。我怀疑是引漏了哪个包,但是我又不知道还要引入什么包


二、希望能在blade-gateway模块通过bladeRedis能拿到其他模块set进去的数据


三、BladeX2.5.0.RELEASE。在windows系统


四、

org.springframework.data.redis.serializer.SerializationException: Could not read JSON: Illegal character ((CTRL-CHAR, code 11)): only regular white space (\r, \n, \t) is allowed between tokens

 at [Source: (byte[])"Jabcd"; line: 1, column: 2]; nested exception is com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 11)): only regular white space (\r, \n, \t) is allowed between tokens

 at [Source: (byte[])"Jabcd"; line: 1, column: 2]

at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:133) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:111) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.AbstractOperations.deserializeValue(AbstractOperations.java:335) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:61) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:225) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:185) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:53) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

at org.springblade.core.redis.cache.BladeRedis.get(BladeRedis.java:94) ~[blade-starter-redis-2.5.0.RELEASE.jar:na]

at org.springblade.gateway.filter.AuthFilter.filter(AuthFilter.java:114) ~[classes/:na]

at org.springframework.cloud.gateway.handler.FilteringWebHandler$GatewayFilterAdapter.filter(FilteringWebHandler.java:138) ~[spring-cloud-gateway-core-2.1.5.RELEASE.jar:2.1.5.RELEASE]

at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter(OrderedGatewayFilter.java:44) ~[spring-cloud-gateway-core-2.1.5.RELEASE.jar:2.1.5.RELEASE]

at org.springframework.cloud.gateway.handler.FilteringWebHandler$DefaultGatewayFilterChain.lambda$filter$0(FilteringWebHandler.java:118) ~[spring-cloud-gateway-core-2.1.5.RELEASE.jar:2.1.5.RELEASE]

at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44) [reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) [reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) [reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoDoFinally.subscribe(MonoDoFinally.java:47) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) [reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Mono.subscribe(Mono.java:3882) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:172) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) [reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Mono.subscribe(Mono.java:3882) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:172) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:275) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:849) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:114) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1623) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:144) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:114) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:275) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:849) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1623) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoFilterWhen$MonoFilterWhenMain.onNext(MonoFilterWhen.java:140) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2185) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoFilterWhen$MonoFilterWhenMain.onSubscribe(MonoFilterWhen.java:103) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoFilterWhen.subscribe(MonoFilterWhen.java:56) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoPeek.subscribe(MonoPeek.java:71) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoOnErrorResume.subscribe(MonoOnErrorResume.java:44) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Mono.subscribe(Mono.java:3882) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:442) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onNext(FluxConcatMap.java:244) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:114) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:42) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:413) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:674) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.onNext(FluxFlattenIterable.java:245) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:179) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1605) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:121) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.DrainUtils.postCompleteDrain(DrainUtils.java:131) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.DrainUtils.postComplete(DrainUtils.java:186) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMaterialize$MaterializeSubscriber.onComplete(FluxMaterialize.java:134) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:337) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:674) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.onComplete(FluxFlattenIterable.java:262) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:144) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1606) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:121) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:825) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:591) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.innerComplete(FluxFlatMap.java:894) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapInner.onComplete(FluxFlatMap.java:988) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:136) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:136) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:825) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:591) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapMain.innerComplete(FluxFlatMap.java:894) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxFlatMap$FlatMapInner.onComplete(FluxFlatMap.java:988) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:136) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.publisher.FluxSubscribeOnValue$ScheduledScalar.run(FluxSubscribeOnValue.java:179) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.scheduler.ElasticScheduler$DirectScheduleTask.run(ElasticScheduler.java:292) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:50) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:27) ~[reactor-core-3.2.15.RELEASE.jar:3.2.15.RELEASE]

at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) ~[na:1.8.0_202]

at java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:1.8.0_202]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_202]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_202]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_202]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_202]

at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_202]

Caused by: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 11)): only regular white space (\r, \n, \t) is allowed between tokens

 at [Source: (byte[])"Jabcd"; line: 1, column: 2]

at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) ~[jackson-core-2.9.10.jar:2.9.10]

at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:693) ~[jackson-core-2.9.10.jar:2.9.10]

at com.fasterxml.jackson.core.base.ParserMinimalBase._throwInvalidSpace(ParserMinimalBase.java:644) ~[jackson-core-2.9.10.jar:2.9.10]

at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._skipWSOrEnd(UTF8StreamJsonParser.java:2951) ~[jackson-core-2.9.10.jar:2.9.10]

at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:691) ~[jackson-core-2.9.10.jar:2.9.10]

at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4142) ~[jackson-databind-2.9.10.3.jar:2.9.10.3]

at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4001) ~[jackson-databind-2.9.10.3.jar:2.9.10.3]

at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3092) ~[jackson-databind-2.9.10.3.jar:2.9.10.3]

at org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer.deserialize(GenericJackson2JsonRedisSerializer.java:131) ~[spring-data-redis-2.1.16.RELEASE.jar:2.1.16.RELEASE]

... 89 common frames omitted


1条回答
提交回复