做的项目是采用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" }
大神,能看看嘛!
<p><img height="231" src="https://oscimg.oschina.net/oscnet/7447df3113bb7222ff26147a4fee5200748.jpg" width="885"></p>
解决了,不知道为啥mapping上还加注册服务的服务名!!!
feginClient不是已经配置过了吗?
集结各类场景实战经验,助你开发运维畅行无忧