springCloud项目部署到tomcat调用服务报错?

发布于 2022-01-06 19:04:48 字数 1876 浏览 839 评论 1

做的项目是采用SpringBoot+SpringCloud+gradle,

把项目打war后,在tomcat能正常启动并且能注册到eureka上.

单个服务中的接口,在当前服务调用都没有问题,但是当前服务调用其他模块的服务就报错,用fegin进行调用服务,在本地

调用没有问题.

错误提示:

{
  "timestamp": 1558928016142,
  "status": 500,
  "error": "Internal Server Error",
  "exception": "feign.FeignException",
  "message": "status 404 reading AccountRepository#findByAccount(Integer); content:n<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.30 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 404 - /api/account/findById</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>/api/account/findById</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><hr class="line"><h3>Apache Tomcat/8.0.30</h3></body></html>",
  "path": "/api/auth/user/findUserByAccountId"
}

 

大神,能看看嘛!

 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情绪失控 2022-01-07 19:51:18

解决了,不知道为啥mapping上还加注册服务的服务名!!!

feginClient不是已经配置过了吗?

 

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文