当TX-LCN开启了日志配置之后, 数据库连接角色没有创建表权限, 启动报错
- Langage dominant
- Java
- Étoiles
- 4.2k
- Forks
- 1.4k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## Why you need it?
Is your feature request related to a problem? Please describe in details
希望在LogDbProperties 在这个类中添加一个checkout属性, 并且在MysqlLoggerHelper类中init()方法改变判断条件, 由我们自己决定是否开启创建表语句
## How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
## Other related information
Add any other context or screenshots about the feature request here.
@Override
public void init() {
if (logDbProperties.isCheckOut()) {
String sql = "CREATE TABLE IF NOT EXISTS `t_logger` (\n" +
" `id` bigint(20) NOT NULL AUTO_INCREMENT,\n" +
" `group_id` varchar(64) NOT NULL ,\n" +
" `unit_id` varchar(32) NOT NULL ,\n" +
" `tag` varchar(50) NOT NULL ,\n" +
" `content` varchar(1024) NOT NULL ,\n" +
" `create_time` varchar(30) NOT NULL,\n" +
" `app_name` varchar(128) NOT NULL,\n" +
" PRIMARY KEY (`id`) USING BTREE\n" +
") ";
dbHelper.update(sql);
}
}
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Start by locating LogDbProperties and MysqlLoggerHelper.init(), then trace how the logging database configuration is loaded during startup. Add the requested checkout setting and verify that table creation is controlled by it, including startup when the database role lacks table-creation permission.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, mysql
- Domaine
- databases
- Type d'issue
- Fonctionnalité
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 38/100