如何在Windows上调用与Redis集成的我的RESTful API方法?

huangapple go评论90阅读模式
英文:

How to invoke my restful api method integrated with redis on windows?

问题

抱歉,代码部分不提供翻译。以下是您提供的文本的翻译:

我正在尝试运行一个带有Redis的样例Spring Boot应用程序。
我正在使用jedis连接工厂,并将其设置在Redis模板的连接工厂中。
我成功找到了一个MSI文件,在Windows上安装了Redis,我可以在服务窗口中看到它正在运行,并且还可以在命令提示符中列出相同的进程。
日志中的GET请求返回404错误。

(图片链接不提供翻译)

英文:

I am trying to run a sample spring boot application with redis.
I am using the jedis connection factory and setting it in Redis Template's connection factory.
I managed to find a MSI file to install redis on windows & I am able to see it running in the services window & also list the process of the same in the command prompt.
Getting 404 for the GET requests in the logs.

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

如何在Windows上调用与Redis集成的我的RESTful API方法?

答案1

得分: 2

请求应该是 localhost:8080/redis/findAll,原因是类级别的 @RequestMapping('redis') 会在该类中的每个请求之前被添加前缀。

英文:

Request should have been localhost:8080/redis/findAll, reason is that @RequestMapping('redis') at class level gets preprended before every request in that class

huangapple
  • 本文由 发表于 2020年8月18日 19:25:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/63467628.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定