一、该问题的重现步骤是什么?
1.新建一个新的工程,将BladeX工程中的System,User,Auth,Gateway工程复制到该工程中
2.修改每个工程SpringBoot启动类中的服务名,如下所示:
@EnableBladeFeign @Configuration @EnableFeignClients({"org.springblade", "com.ai.apac.smartenv.system"}) @MapperScan({"org.springblade.**.mapper.**", "com.ai.apac.smartenv.**.mapper.**"}) @SpringCloudApplication public class SystemApplication { public static void main(String[] args) { BladeApplication.run(ApplicationConstant.APPLICATION_SYSTEM_NAME, SystemApplication.class, args); } }
其中ApplicationConstant类定义如下:
public interface ApplicationConstant {
String BASE_PACKAGES = "com.ai.apac.smartenv"; String APPLICATION_NAME_PREFIX = "smartenv-"; String APPLICATION_SYSTEM_NAME = "smartenv-system"; String APPLICATION_USER_NAME = "smartenv-user"; String APPLICATION_AUTH_NAME = "smartenv-auth"; String APPLICATION_GATEWAY_NAME = "smartenv-gateway"; }
3. 启动所有工程,在nacos上能看到如下结果
4.在Swagger上调用字典查询接口,接口请求如下:
二、你期待的结果是什么?实际看到的又是什么?
期望返回正确的结果,但是接口返回如下信息:
{
"code": 500, "success": false, "data": {}, "msg": "nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database. Cause: java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: blade-system\n### The error may exist in com/ai/apac/smartenv/system/mapper/DictBizMapper.java (best guess)\n### The error may involve com.ai.apac.smartenv.system.mapper.DictBizMapper.selectPage\n### The error occurred while executing a query\n### Cause: java.lang.RuntimeException: com.netflix.client.ClientException: Load balancer does not have available server for client: blade-system" }
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
目前使用2.2.2.Release版本,在Mac操作系统上
四、请提供详细的错误堆栈信息,这很重要。
后台错误堆栈信息如下:
r$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
五、若有更多详细信息,请在下面提供。
-
已解决,FeginClient接口类也需要改,如下所示
@FeignClient( value = ApplicationConstant.APPLICATION_SYSTEM_NAME, fallback = IDataScopeClientFallback.class ) public interface IDataScopeClient
讨论(0)
官方新品
- 热议问题
-
物联网平台支持本地存储吗,不用minio
1
-
bladx admin、gateway等项目起不来
1
-
解决sql注入问题导致gateway无法启动,报错java.io.FileNotFoundException:WebMvcConfigurer.class
1
-
一个用户绑定多角色,在登陆后获取其并集
1
-
mvn clean compile 编译 BladeX-Tool 提示 ... /ojdbc7-12.2.0.1.pom 401 Unauthorized
2
-
gateway无法启动,报错java.io.FileNotFoundException:WebMvcConfigurer.class
1
-
cookie中token缺失HttpOnly和Secure属性
1
-
在nacos配置多数据库之后sql日志不能正常打印了
1
-
无法本地调试服务
1
-
启动流程设计器工程flowable-design,表act_id_property用的是版本6.5.0.1,需要引入哪些依赖
1
扫一扫访问 Blade技术社区 移动端