一、该问题的重现步骤是什么?
1. 最新版bladex-boot 开启多租户模式。
2. 新建一个租户库 bladex-boot-00000 拷贝 blade-notice,blade-tenant 两张表到新库中。
3.admin登录 点击通知公告 博客管理等节点报错
二、你期待的结果是什么?实际看到的又是什么?
期待的结果
(1):创建租户如果要数据库隔离,能否自动生成数据库及相应的 有租户数据的表?
(2):如果指定了租户的库,能否处理下如果该库下有表就读取该库下的表,否则去主库读取?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
bladex-boot 最新版 windows 10
四、请提供详细的错误堆栈信息,这很重要。
--点击通知公告报错
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in (?))]; nested exception is java.sql.SQLSyntaxErrorException: Table 'bladex_boot_saber_000000.blade_scope_data' doesn't exist ### Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in (?))]; nested exception is java.sql.SQLSyntaxErrorException: Table 'bladex_boot_saber_000000.blade_scope_data' doesn't exist
--点击博客管理报错
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in (?))]; nested exception is java.sql.SQLSyntaxErrorException: Table 'bladex_boot_saber_000000.blade_scope_data' doesn't exist ### Cause: org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select resource_code, scope_column, scope_field, scope_type, scope_value from blade_scope_data where scope_class = ? and id in (select scope_id from blade_role_scope where scope_category = 1 and role_id in (?))]; nested exception is java.sql.SQLSyntaxErrorException: Table 'bladex_boot_saber_000000.blade_scope_data' doesn't exist
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端