通过abp官方自助创建的项目排坑记录

1、自动生成项目后迁移数据库如果遇到max key length is 767 bytes

mysql5.6下用如下脚本解决不了问题

set global innodb_file_format = BARRACUDA;

set global innodb_large_prefix = ON;

直接换成mysql5.7.36不用任何设置就可以迁移成功。

Specified key was too long; max key length is 767 bytes at MySqlConnector.Core.ServerSession.ReceiveReplyAsyncAwaited · Issue #13650 · abpframework/abp · GitHub

2、An error occurred during the ABP remote HTTP request   ----abp官方自助创建的项目,一定要记得修改项目启动为多项目启动,所有web项目建议都设置为多项目启动(XXX.HttpApi.Host、XXX.IdentityServer、XXX.Web)。

如果只启动例如web后缀的MVC项目,会提示目标计算机积极拒绝。详细错误如下:

2022-08-16 16:34:36.300 +08:00 [INF] Initialized all ABP modules.
2022-08-16 16:34:36.418 +08:00 [INF] Application started. Press Ctrl+C to shut down.
2022-08-16 16:34:36.419 +08:00 [INF] Hosting environment: Development
2022-08-16 16:34:36.419 +08:00 [INF] Content root path: D:\githubRepository\OTAHM\src\OTAHM.Web\
2022-08-16 16:34:36.468 +08:00 [INF] Request starting HTTP/2 GET https://localhost:44313/ - -
2022-08-16 16:34:37.449 +08:00 [WRN] Could not find IdentityClientConfiguration for AbpMvcClient. Either define a configuration for AbpMvcClient or set a default configuration.
2022-08-16 16:34:37.465 +08:00 [INF] Start processing HTTP request GET "https://localhost:44365/api/abp/application-configuration?api-version=1.0"
2022-08-16 16:34:37.467 +08:00 [INF] Sending HTTP request GET "https://localhost:44365/api/abp/application-configuration?api-version=1.0"
2022-08-16 16:34:41.803 +08:00 [ERR] An unhandled exception has occurred while executing the request.
Volo.Abp.Http.Client.AbpRemoteCallException: An error occurred during the ABP remote HTTP request. (由于目标计算机积极拒绝,无法连接。 (localhost:44365)) See the inner exception for details.
 ---> System.Net.Http.HttpRequestException: 由于目标计算机积极拒绝,无法连接。 (localhost:44365)
 ---> System.Net.Sockets.SocketException (10061): 由于目标计算机积极拒绝,无法连接。

3、AbpException: Could not find the bundle file '/libs/abp/core/abp.css' for the bundle 'Basic.Global'!

在项目目录(XXX.web)下运行:abp install-libs
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ABP创建MySQL数据库的步骤如下: 1. 首先,使用ABP提供的项目模板创建一个新的项目。该模板提供了Module Zero项目,其中包含了用户、角色、权限等通用功能。然而,使用该模板连接MySQL可能会导致错误,无法正常运行。 2. 为了解决ABP+MySQL的问题,需要进行一些修改。打开源代码中的`DYDbContextConfigurer`类,该类用于配置数据库连接。在该类中,找到`Configure`方法,并将其中的代码修改如下: ```csharp public static class DYDbContextConfigurer { public static void Configure(DbContextOptionsBuilder<DYDbContext> builder, string connectionString) { builder.UseMySql(connectionString, new MySqlServerVersion(new System.Version(5, 0))); } public static void Configure(DbContextOptionsBuilder<DYDbContext> builder, DbConnection connection) { builder.UseMySql(connection, new MySqlServerVersion(new System.Version(5, 0))); } } ``` 3. 接下来,打开Web项目的Web.config文件。由于上一步添加了`MySql.Data.Entity`,所以Web.config已经添加了MySQL的相关配置。在Web.config中,找到连接字符串部分,注释掉SQL Server的连接字符串,并添加新的MySQL连接字符串。 通过以上步骤,你就可以成功创建ABP项目的MySQL数据库了。请确保你已经正确配置了MySQL数据库,并提供了正确的连接字符串。 #### 引用[.reference_title] - *1* *3* [使用ABP EntityFramework连接MySQL数据库](https://blog.csdn.net/weixin_31292909/article/details/113164152)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [ABP框架数据库改为MySQL](https://blog.csdn.net/daiyue945/article/details/128236930)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值