From ef3ed039f04adcd1bf53654ecf0a1b805f35d293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=86=9B?= <510423039@qq.com> Date: Tue, 10 Jan 2023 20:56:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/content/index.md | 11 ++-- .../zh/extension/统一返回值格式.md | 14 ++--- .../zh/getting-started/introduction.md | 17 ++--- .../zh/getting-started/quick-start.md | 62 ++++++++++--------- 4 files changed, 54 insertions(+), 50 deletions(-) diff --git a/docs/content/index.md b/docs/content/index.md index 32341795..60048318 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -1,19 +1,19 @@ Title: Abp Vnext Pro + # Abp Vnext Pro [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/WangJunZzz/abp-vnext-pro/blob/main/LICENSE) - ## 介绍 - 完全免费开源 -- ABP vNext的前身是asp.net boilerplate(老版abp),它不是一个简单的版本更新,而是完全基于.NET Core的重写。 -- ABP vNext 社区版的UI不使用于实际项目开发。为此,结合Vben Admin 打造开箱即用的ABP vNext Pro。 - +- ABP vNext 的前身是 asp.net boilerplate(老版 abp),它不是一个简单的版本更新,而是完全基于.NET Core 的重写。 +- ABP vNext 社区版的 UI 不使用于实际项目开发。为此,结合 Vben Admin 打造开箱即用的 ABP vNext Pro。 ## 演示 -- [演示地址](http://abp.cncore.club/) + +- [演示地址](http://116.205.177.85/login) ## 系统功能 @@ -32,7 +32,6 @@ Title: Abp Vnext Pro - [x] 多租户 - [x] 文件管理 - ![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/4.4/4.4login.png) ![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/01.png) ![](https://blog-resouce.oss-cn-shenzhen.aliyuncs.com/images/abp/02.png) diff --git a/docs/content/user-guide/zh/extension/统一返回值格式.md b/docs/content/user-guide/zh/extension/统一返回值格式.md index eeabcb90..d651d9b9 100644 --- a/docs/content/user-guide/zh/extension/统一返回值格式.md +++ b/docs/content/user-guide/zh/extension/统一返回值格式.md @@ -14,7 +14,7 @@ - 定义返回类型 -```csharp +```csharp public class WrapResult { public bool Success { get; private set; } @@ -51,10 +51,10 @@ public class WrapResult ## 实现思路 -- 定义 DontWrapResultAttribute +- 定义 WrapResultAttribute ```csharp -public class DontWrapResultAttribute : Attribute +public class WrapResultAttribute : Attribute { } ``` @@ -76,12 +76,12 @@ public sealed class ResultExceptionFilter : IAsyncExceptionFilter, ITransientDep private bool ShouldHandleException(ExceptionContext context) { - if (context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(DontWrapResultAttribute), true).Any()) + if (context.ActionDescriptor.AsControllerActionDescriptor().ControllerTypeInfo.GetCustomAttributes(typeof(WrapResultAttribute), true).Any()) { return true; } - if (context.ActionDescriptor.GetMethodInfo().GetCustomAttributes(typeof(DontWrapResultAttribute), true).Any()) + if (context.ActionDescriptor.GetMethodInfo().GetCustomAttributes(typeof(WrapResultAttribute), true).Any()) { return true; } @@ -174,12 +174,12 @@ public sealed class ResultExceptionFilter : IAsyncExceptionFilter, ITransientDep ## 使用 -- 在 Controller 上或者 Action 上打上 DontWrapResultAttribute 特性 +- 在 Controller 上或者 Action 上打上 WrapResultAttribute 特性 - 例如 ```csharp [Route("Permissions")] - [DontWrapResult] + [WrapResult] public class PermissionController : AbpProController,IRolePermissionAppService { private readonly IRolePermissionAppService _rolePermissionAppService; diff --git a/docs/content/user-guide/zh/getting-started/introduction.md b/docs/content/user-guide/zh/getting-started/introduction.md index aea5c5f4..79bf0131 100644 --- a/docs/content/user-guide/zh/getting-started/introduction.md +++ b/docs/content/user-guide/zh/getting-started/introduction.md @@ -1,13 +1,16 @@ # 介绍 -Lion.AbpPro 是Abp Vnext 的Vue3版本实现,同时也是免费开源。它有助于提高开发效率,属于开箱即用的后台管理系统,也能适用微服务。 +Lion.AbpPro 是 Abp Vnext 的 Vue3 版本实现,同时也是免费开源。它有助于提高开发效率,属于开箱即用的后台管理系统,也能适用微服务。 ## 后端项目结构 + ```bash ├── Directory.Build.props nuget 版本控制 ├── frameworks # 公共模块 -│ ├── CAP # dotnetcore.cap -│ └── Extensions # 自定义扩展 +│ ├── src # +│ ├── Lion.AbpPro.CAP # dotnetcore.cap +│ ├── Lion.AbpPro.Core # 核心扩展 +│ └── Lion.AbpPro.Localization # 本地化 ├── gateways # 网关 │ └── Lion.AbpPro.WebGateway # 基于ocelot网关 ├── modules # 模块 @@ -27,6 +30,7 @@ Lion.AbpPro 是Abp Vnext 的Vue3版本实现,同时也是免费开源。它有 ``` ## 前端项目结构 + ```bash ├── _nginx # docker 打包 ├── build # 打包脚本相关 @@ -82,10 +86,7 @@ Lion.AbpPro 是Abp Vnext 的Vue3版本实现,同时也是免费开源。它有 ├── vite.config.ts # vite配置文件 └── windi.config.ts # windcss配置文件 ``` -## 相关视频 -待完善 - -## 相关文章 +## 相关视频 -待完善 +[B 站](https://www.bilibili.com/video/BV1pt4y1E7aZ/?spm_id_from=333.337.search-card.all.click&vd_source=963e10b4fc37556dd738bd98e1d46a0f) diff --git a/docs/content/user-guide/zh/getting-started/quick-start.md b/docs/content/user-guide/zh/getting-started/quick-start.md index 884dc3bf..ac13000b 100644 --- a/docs/content/user-guide/zh/getting-started/quick-start.md +++ b/docs/content/user-guide/zh/getting-started/quick-start.md @@ -1,6 +1,7 @@ # 快速开始 ## 先决条件 + - [dotnet core 6.0.202](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) - [nodejs 16+](https://nodejs.org/zh-cn/) - [pnpm](https://www.pnpm.cn/installation) @@ -8,84 +9,87 @@ - [redis](https://redis.io/docs/getting-started/installation/) - [rabbitmq 可选](https://www.rabbitmq.com/download.html) +## Docker 启动 MySql -## Docker启动MySql -``` bash +```bash docker run --name mymysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=1q2w3E* -d mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci ``` -## Docker启动Redis -``` bash + +## Docker 启动 Redis + +```bash docker run --name myredis -p 6379:6379 -d redis:latest redis-server ``` -## Docker启动RabbitMq -``` bash + +## Docker 启动 RabbitMq + +```bash docker run -d --name myrabbitmq -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 rabbitmq:management ``` + ## 创建新项目 +### 安装 Cli 工具 -### 安装Cli工具 - [仓库地址](https://github.com/WangJunZzz/Lion.AbpPro.Cli) -``` bash +```bash dotnet tool install Lion.AbpPro.Cli -g ``` ### 生成项目 **提供了三个模板生成** + - 生成源码版本 ```bash -lion.abp new abp-vnext-pro -c 公司名称 -p 项目名称 -o 输出路径(可选) -v 版本号(可选) +lion.abp new abp-vnext-pro -c 公司名称 -p 项目名称 -v 版本号(默认LastRelease) ``` -- nuget包形式的基础版本,包括abp自带的所有模块,已经pro的通知模块,数据字典模块 以及ocelot网关 +- nuget 包形式的基础版本,包括 abp 自带的所有模块,已经 pro 的通知模块,数据字典模块 以及 ocelot 网关 ```bash -lion.abp new abp-vnext-pro-basic -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) -o 项目输出路径(可选). +lion.abp new abp-vnext-pro-basic -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) ``` -- nuget包形式的基础版本,包括abp自带的所有模块,已经pro的通知模块,数据字典模块 无ocelot网关 +- nuget 包形式的基础版本,包括 abp 自带的所有模块,已经 pro 的通知模块,数据字典模块 无 ocelot 网关 + ```bash -lion.abp new abp-vnext-pro-basic-no-ocelot -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) -o 项目输出路径(可选). +lion.abp new abp-vnext-pro-basic-no-ocelot -c 公司名称 -p 项目名称 -v 版本(默认LastRelease) ``` - ### 后端 + - 修改 HttpApi.Host-> appsettings.json 配置 - - Mysql 连接字符串 - - Redis 连接字符串 - - RabbitMq(如果不需要启用设置为 false) - - Es 地址即可(如果没有 es 也可以运行,只是前端 es 日志页面无法使用而已,不影响后端项目启动) + - Mysql 连接字符串 + - Redis 连接字符串 + - RabbitMq(如果不需要启用设置为 false) + - Es 地址即可(如果没有 es 也可以运行,只是前端 es 日志页面无法使用而已,不影响后端项目启动) - 修改 IdentityServer-> appsettings.json 数据库连接字符串 - 修改 DbMigrator-> appsettings.json 数据库连接字符串 -- 右键单击.DbMigrator项目,设置为启动项目运行,按F5(或Ctrl + F5) 运行应用程序. 它将具有如下所示的输出: -![](../../../img/migrating.png) +- 右键单击.DbMigrator 项目,设置为启动项目运行,按 F5(或 Ctrl + F5) 运行应用程序. 它将具有如下所示的输出: + ![](../../../img/migrating.png) !!! note 种子数据 初始的种子数据在数据库中创建了 admin 用户(密码为1q2w3E*) 用于登录应用程序. 所以, 对于新数据库至少使用 .DbMigrator 一次. - -!!! note Ocelot网关 +!!! note Ocelot 网关 如果不需要使用Ocelot网关可以移除Lion.AbpPro.WebGateway项目,前端接口地址直接修改为Lion.AbpPro.HttpApi.Host的接口地址。 - - 多项目启动(HttpApi.Host,IdentityServer,WebGateway),就能看到后台服务登陆页面,如下: -![](../../../img/login.png) - - - + ![](../../../img/login.png) ## 前端 + - [Vben Admin 文档](https://vvbin.cn/doc-next/) -### 安装npm包 +### 安装 npm 包 ```bash -pnmp install +pnpm install ``` ### 启动项目