Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR invalid longitude,latitude pair 111.110000,111.230000
2024-09-04 01:00:53
io.lettuce.core.RedisCommandExecutionException: ERR invalid longitude,latitude pair 111.110000,111.230000 at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.ExceptionFactory.createExecutionException(ExceptionFactory.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:) ~[lettuce-core-.RELEASE.jar:na] at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:) ~[lettuce-core-.RELEASE.jar:na] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:) ~[netty-all-.Final.jar:.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:) ~[netty-all-.Final.jar:.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$.run(SingleThreadEventExecutor.java:) ~[netty-all-.Final.jar:.Final] at io.netty.util..run(ThreadExecutorMap.java:) ~[netty-all-.Final.jar:.Final] at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:) ~[netty-all-.Final.jar:.Final] at java.lang.Thread.run(Thread.java:) [na:1.8.0_191]
可以看到redis在操作geo的时候,我的数据又出问题了,
看代码:
@RequestMapping(value = "/s/{id}", method = RequestMethod.GET) @ResponseBody public void detail22(@PathVariable Long id) { /* Cursor scan = redisTemplate.opsForHash().scan("1", ScanOptions.NONE); Set<String> keys = redisTemplate.keys("1111"); for(String key:keys){ System.out.println(key); }*/ redisTemplate.boundGeoOps(").add(new Point(111.11,111.23),"cxy"); String s = redisTemplate.boundGeoOps(").toString(); System.out.println(s); }
“经度最大是180° 最小是0°纬度最大是 90° 最小是0°”
那么我这个地方所以出问题了,可以得知问题所在
修改:
@RequestMapping(value = "/s/{id}", method = RequestMethod.GET) @ResponseBody public void detail22(@PathVariable Long id) { /* Cursor scan = redisTemplate.opsForHash().scan("1", ScanOptions.NONE); Set<String> keys = redisTemplate.keys("1111"); for(String key:keys){ System.out.println(key); }*/ redisTemplate.boundGeoOps(").add(new Point(111.11,11.23),"cxy"); String s = redisTemplate.boundGeoOps(").toString(); System.out.println(s); }
可以得知没有报错了
最新文章
- RabbitMQ 集群
- [2014.01.27]wfPrintOcx 票据打印控件 v5.3
- jquery基本选择器id
- ndk学习8: 编译动态库
- android 常用类
- f4: Facebook’s Warm BLOB Storage System——Erasure Code
- Xcode 编译运行报错: CpResource /user/xxxx/ xxx Directory not empty
- linux下mysql命令
- java反射机制性能优化
- MountService初探
- UI事务重叠引发的crash
- re模块的方法总结
- java8 按对象属性值排序
- ajax简单登录(踩过的坑)
- ubuntu18.04.2LTS下安装和配置MySql数据库 --ubuntu
- ORA-00911: invalid character 包含中文报错
- (网页)JS中的小技巧,但十分的实用!
- YOLO V3论文理解
- UVALive-3268 Jamie&#39;s Contact Groups (最大流,网络流建模)
- OSG和ProLand 的海面仿真