首页 文章 精选 留言 我的

精选列表

搜索[分库分表],共10012篇文章
优秀的个人博客,低调大师

希腊字母读音表

1 Α α alpha /a:lf/ 阿尔法2 Β β beta /bet/ 贝塔3 Γ γ gamma /ga:m/ 伽马4 Δ δ delta /delt/ 德尔塔5 Ε ε epsilon /ep`silon/ 伊普西龙6 Ζ ζ zeta /zat/ 截塔7 Η η eta /eit/ 艾塔8 Θ θ thet /θit/ 西塔9 Ι ι iot /aiot/ 约塔10 Κ κ /kappa/ kap 卡帕11 ∧ λ /lambda/ lambd 兰布达12 Μ μ mu /mju/ 缪13 Ν ν nu /nju/ 纽14 Ξ ξ xi /ksi/ 克西15 Ο ο omicron /omik`ron/ 奥密克戎16 ∏ π pi /pai/ 派17 Ρ ρ rho /rou/ 柔18 ∑ σ sigma /`sigma/ 西格马19 Τ τ tau /tau/ 套20 Υ υ upsilon /jup`silon/ 宇普西龙21 Φ φ phi /fai/ 佛爱22 Χ χ chi /phai/ 西23 Ψ ψ psi /psai/ 普西24 Ω ω omega /o`miga/ 欧米伽

优秀的个人博客,低调大师

Laravel5.5执行表迁移命令出现表为空的解决方案

今天在使用一个第三方包 laravel-admin 时,出现了这样的错误: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '',折腾了好久,终于知道了解决方法,原来是配置文件的缓存没有清理。 一、问题 vagrant@homestead:~/Code/laravel-shop$ php artisan admin:install 错误提示: In Connection.php line 664: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table `` (`id` int uns igned not null auto_increment primary key, `username` varchar(190) not null, `password` varchar(60) not null, `name ` varchar(255) not null, `avatar` varchar(255) null, `remember_token` varchar(100) null, `created_at` timestamp nul l, `updated_at` timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci) In Connection.php line 452: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' 二、解决方案 database/migrations/2016_01_04_173148_create_admin_table.php <?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateAdminTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { $connection = config('admin.database.connection') ?: config('database.default'); // dd(app('config')); Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) { $table->increments('id'); $table->string('username', 190)->unique(); $table->string('password', 60); $table->string('name'); $table->string('avatar')->nullable(); $table->string('remember_token', 100)->nullable(); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) { $table->increments('id'); $table->string('name', 50)->unique(); $table->string('slug', 50); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) { $table->increments('id'); $table->string('name', 50)->unique(); $table->string('slug', 50); $table->string('http_method')->nullable(); $table->text('http_path')->nullable(); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) { $table->increments('id'); $table->integer('parent_id')->default(0); $table->integer('order')->default(0); $table->string('title', 50); $table->string('icon', 50); $table->string('uri', 50)->nullable(); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) { $table->integer('role_id'); $table->integer('user_id'); $table->index(['role_id', 'user_id']); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) { $table->integer('role_id'); $table->integer('permission_id'); $table->index(['role_id', 'permission_id']); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function (Blueprint $table) { $table->integer('user_id'); $table->integer('permission_id'); $table->index(['user_id', 'permission_id']); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) { $table->integer('role_id'); $table->integer('menu_id'); $table->index(['role_id', 'menu_id']); $table->timestamps(); }); Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) { $table->increments('id'); $table->integer('user_id'); $table->string('path'); $table->string('method', 10); $table->string('ip', 15); $table->text('input'); $table->index('user_id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { $connection = config('admin.database.connection') ?: config('database.default'); Schema::connection($connection)->dropIfExists(config('admin.database.users_table')); Schema::connection($connection)->dropIfExists(config('admin.database.roles_table')); Schema::connection($connection)->dropIfExists(config('admin.database.permissions_table')); Schema::connection($connection)->dropIfExists(config('admin.database.menu_table')); Schema::connection($connection)->dropIfExists(config('admin.database.user_permissions_table')); Schema::connection($connection)->dropIfExists(config('admin.database.role_users_table')); Schema::connection($connection)->dropIfExists(config('admin.database.role_permissions_table')); Schema::connection($connection)->dropIfExists(config('admin.database.role_menu_table')); Schema::connection($connection)->dropIfExists(config('admin.database.operation_log_table')); } } 清除配置文件缓存 vagrant@homestead:~/Code/laravel-shop$ php artisan config:cache 再次执行发布命令,就可以了: vagrant@homestead:~/Code/laravel-shop$ php artisan admin:install Migrating: 2016_01_04_173148_create_admin_table Migrated: 2016_01_04_173148_create_admin_table Admin directory was created: /app/Admin HomeController file was created: /app/Admin/Controllers/HomeController.php ExampleController file was created: /app/Admin/Controllers/ExampleController.php Bootstrap file was created: /app/Admin/bootstrap.php Routes file was created: /app/Admin/routes.php vagrant@homestead:~/Code/laravel-shop$ 原文地址:https://segmentfault.com/a/1190000015532236

优秀的个人博客,低调大师

sharding-jdbc不分库策略在springboot的application.properties中的写法

sharding-jdbc不分片策略NoneShardingStrategy在springboot中的写法 使用springboot的application.properties来定义分片策略时, sharding.jdbc.config.sharding.default-database-strategy.none= 这样写会报错 *************************** APPLICATION FAILED TO START *************************** Description: Binding to target io.shardingjdbc.spring.boot.sharding.SpringBootShardingRuleConfigurationProperties@675ffd1d failed: Property: sharding.jdbc.config.sharding.defaultDatabaseStrategy.none Value: Reason: Failed to convert property value of type 'java.lang.String' to required type 'io.shardingjdbc.core.yaml.sharding.strategy.YamlNoneShardingStrategyConfiguration' for property 'defaultDatabaseStrategy.none'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'io.shardingjdbc.core.yaml.sharding.strategy.YamlNoneShardingStrategyConfiguration' for property 'none': no matching editors or conversion strategy found Action: Update your application's configuration 需要写成 sharding.jdbc.config.sharding.default-database-strategy.none.any= 即,在none后面再加一层随便什么名字。 因为springboot中,使用了@ConfigurationProperties的类,在properties文件中就可以通过 “prefix前缀 . 成员变量名 = 值” 来配置。 如果成员变量还是一个类,就再加一层来配置。即“prefix前缀 . 成员变量名 . 子类成员变量名 = 值”。 特殊的, 如果成员变量是一个类,而它却没有成员变量了(例如amlNoneShardingStrategyConfiguration),那么仍然需要加一层。即“prefix前缀 . 成员变量名 . 任意名 = 值”。 // SpringBootShardingRuleConfigurationProperties.java @ConfigurationProperties(prefix = "sharding.jdbc.config.sharding") public class SpringBootShardingRuleConfigurationProperties extends YamlShardingRuleConfiguration { } // YamlNoneShardingStrategyConfiguration.java public final class YamlNoneShardingStrategyConfiguration implements YamlShardingStrategyConfiguration { }

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册