一、该问题的重现步骤是什么?
1. 检出BladeX-Boot 2.7.1版本代码,检出Sabar 2.7.1版本代码;
2. 分别运行前后端工程;
3. 点击登录,报“未获得用户的租户信息”的错误。
二、你期待的结果是什么?实际看到的又是什么?
期待能够正常登录,实际无法正常登录
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
BladeX-Boot 2.7.1 ,Sabar 2.7.1 ,Windows操作系统
四、请提供详细的错误堆栈信息,这很重要。
2021-01-12 14:04:49.979 INFO 9424 --- [ XNIO-1 task-5] o.s.core.log.aspect.RequestLogAspect :
================ Request Start ================
===> GET: /blade-system/tenant/info Parameters: {"domain":"http://localhost:1888"}
===Headers=== sec-fetch-mode: cors
===Headers=== referer: http://localhost:1888/
===Headers=== sec-fetch-site: same-origin
===Headers=== accept-language: zh-CN,zh;q=0.9
===Headers=== x-forwarded-proto: http
===Headers=== x-forwarded-port: 1888
===Headers=== x-forwarded-for: 127.0.0.1
===Headers=== accept: application/json, text/plain, */*
===Headers=== authorization: Basic c2FiZXI6c2FiZXJfc2VjcmV0
===Headers=== sec-ch-ua: "Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"
===Headers=== sec-ch-ua-mobile: ?0
===Headers=== x-forwarded-host: localhost:1888
===Headers=== host: localhost
===Headers=== connection: close
===Headers=== accept-encoding: gzip, deflate, br
===Headers=== user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
===Headers=== sec-fetch-dest: empty
================ Request End ================
============== Sql Start ==============
Execute ID :org.springblade.modules.system.mapper.TenantMapper.selectOne
Execute SQL :SELECT id, tenant_id, tenant_name, domain, background_url, linkman, contact_number, address, account_number, expire_time, datasource_id, license_key, create_user, create_dept, create_time, update_user, update_time, status, is_deleted FROM blade_tenant WHERE is_deleted = 0 AND (domain = ?) AND tenant_id = ''
Execute Time:31 ms
============== Sql End ==============
2021-01-12 14:04:50.020 INFO 9424 --- [ XNIO-1 task-5] o.s.core.log.aspect.RequestLogAspect :
================ Response Start ================
===Result=== {"code":200,"success":true,"data":{},"msg":"操作成功"}
<=== GET: /blade-system/tenant/info (40 ms)
================ Response End ================
============== Sql Start ==============
Execute ID :org.springblade.modules.system.mapper.TenantMapper.selectOne
Execute SQL :SELECT id, tenant_id, tenant_name, domain, background_url, linkman, contact_number, address, account_number, expire_time, datasource_id, license_key, create_user, create_dept, create_time, update_user, update_time, status, is_deleted FROM blade_tenant WHERE is_deleted = 0 AND (tenant_id = ?) AND tenant_id = ''
Execute Time:32 ms
============== Sql End ==============
2021-01-12 14:05:42.531 ERROR 9424 --- [ XNIO-1 task-7] o.s.c.l.e.BladeRestExceptionTranslator : 业务异常
org.springblade.core.log.exception.ServiceException: 未获得用户的租户信息
五、若有更多详细信息,请在下面提供。
个人定位发现,问题在于上面日志信息中 ,打出的日志信息均多出了一句“ AND tenant_id = '' ”,导致无法查询到相应结果。
扫一扫访问 Blade技术社区 移动端