From 31b58e55aa2b4d31c5d119b537f2bb63732cea7e Mon Sep 17 00:00:00 2001 From: RB Date: Sat, 28 Dec 2024 18:40:29 +0800 Subject: [PATCH] rebuild40 --- .travis.yml | 6 +++--- .../java/com/rebuild/core/BootEnvironmentPostProcessor.java | 2 +- src/main/resources/application-dev.yml | 2 +- src/main/resources/scripts/db-init.sql | 6 +++--- src/main/resources/web/assets/js/admin/setup-install.js | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index f84781d49b..a18d810c9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,9 @@ git: submodules: false before_script: - - mysql -e "CREATE DATABASE rebuild30 COLLATE utf8mb4_general_ci;" - - mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild30.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;" - - mysql -D rebuild30 < src/main/resources/scripts/db-init.sql + - mysql -e "CREATE DATABASE rebuild40 COLLATE utf8mb4_general_ci;" + - mysql -e "CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; GRANT ALL PRIVILEGES ON rebuild40.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES;" + - mysql -D rebuild40 < src/main/resources/scripts/db-init.sql # codecov after_success: diff --git a/src/main/java/com/rebuild/core/BootEnvironmentPostProcessor.java b/src/main/java/com/rebuild/core/BootEnvironmentPostProcessor.java index dcc14d6b51..84bdb2e2d6 100644 --- a/src/main/java/com/rebuild/core/BootEnvironmentPostProcessor.java +++ b/src/main/java/com/rebuild/core/BootEnvironmentPostProcessor.java @@ -107,7 +107,7 @@ public void postProcessEnvironment(ConfigurableEnvironment env, SpringApplicatio // `application-bean.xml` 占位符必填 if (dbUrl == null) { - dbUrl = "jdbc:mysql://127.0.0.1:3306/rebuild30?characterEncoding=UTF8"; + dbUrl = "jdbc:mysql://127.0.0.1:3306/rebuild40?characterEncoding=UTF8"; confPs.put("db.url", dbUrl); } if (env.getProperty("db.user") == null) confPs.put("db.user", "rebuild"); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index cad6fc373f..1cc81c3310 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,5 +1,5 @@ # !!! `db.*` ONLY FOR DEV MODE !!! -db.url: jdbc:mysql://127.0.0.1:3306/rebuild30?characterEncoding=UTF8&useUnicode=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B08:00 +db.url: jdbc:mysql://127.0.0.1:4653/rebuild40?characterEncoding=UTF8&useUnicode=true&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B08:00 db.user: rebuild db.passwd: rebuild # Use built-in ehcache if redis not defined or unavailable diff --git a/src/main/resources/scripts/db-init.sql b/src/main/resources/scripts/db-init.sql index 1dc803b14c..18e5063071 100644 --- a/src/main/resources/scripts/db-init.sql +++ b/src/main/resources/scripts/db-init.sql @@ -7,12 +7,12 @@ -- #1 database/user -- 首次使用请移除以下注释以创建数据库和用户 /* -CREATE DATABASE rebuild30 COLLATE utf8mb4_general_ci; +CREATE DATABASE rebuild40 COLLATE utf8mb4_general_ci; CREATE USER 'rebuild'@'127.0.0.1' IDENTIFIED BY 'rebuild'; -GRANT ALL PRIVILEGES ON rebuild30.* TO 'rebuild'@'127.0.0.1'; +GRANT ALL PRIVILEGES ON rebuild40.* TO 'rebuild'@'127.0.0.1'; GRANT RELOAD ON *.* TO 'rebuild'@'127.0.0.1'; FLUSH PRIVILEGES; -USE rebuild30; +USE rebuild40; */ -- #2 schemas diff --git a/src/main/resources/web/assets/js/admin/setup-install.js b/src/main/resources/web/assets/js/admin/setup-install.js index 58d3b5abb3..67ce5a7f50 100644 --- a/src/main/resources/web/assets/js/admin/setup-install.js +++ b/src/main/resources/web/assets/js/admin/setup-install.js @@ -193,7 +193,7 @@ class DatabaseConf extends React.Component {
{$L('数据库名称')}
- +
{$L('如数据库不存在系统将自动创建')}
@@ -260,7 +260,7 @@ class DatabaseConf extends React.Component { dbType: 'mysql', dbHost: this.state.dbHost || '127.0.0.1', dbPort: this.state.dbPort || 3306, - dbName: this.state.dbName || 'rebuild30', + dbName: this.state.dbName || 'rebuild40', dbUser: this.state.dbUser || 'rebuild', dbPassword: this.state.dbPassword || 'rebuild', }