ABP which was not registered.】的更多相关文章

ABP 错误: 'AoLongData.Finances.FinanceService' is waiting for the following dependencies:- Service 'Abp.Domain.Repositories.IRepository`2[[AoLongData.Entities.Finances.GL_accvouch, AoLongData.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]…
“/”应用程序中的服务器错误. Can't create component 'SWJ.SSO.DomainServices.TestService' as it has dependencies to be satisfied. 'SWJ.SSO.DomainServices.TestService' is waiting for the following dependencies:- Service 'Abp.Domain.Repositories.IRepository`1[[SWJ.S…
模块介绍 ABP提供了构建模块并将这些模块组合起来创建应用的基础设施.一个模块可以依赖另一个模块.一般来说,一个程序集可以认为是一个模块.如果应用中有多个程序集,建议为每个程序集创建一个模块定义.模块系统通常关注服务端. 模块定义 一个模块是由一个派生了AbpModule的类定义的.比如说我们在开发一个可以用在不同的应用中的博客模块.最简单的模块定义如下: public class MyBlogApplicationModule : AbpModule { public override voi…
在ABP框架中存在一个缓存机制,使用ICache的继承类来存储最终需要缓存的数据,可以吧ICache看成一个字典对象,使用Key作为真实数据的具有唯一性的表示.使用上与字典对象完全相同,Get方法传递Key,还有数据工厂作为参数就能返回最终的值,Set方法用于存储.包含一个TimeSpan属性用于指定最长不使用数据的过期时间. /// <summary> /// Defines a cache that can be store and get items by keys. /// </…
http://www.codeproject.com/Articles/1080517/Aspect-Oriented-Programming-using-Interceptors-wit Download sample application (or see the latest on Github) Contents Introduction What is Aspect Oriented Programming (AOP) and Method Interception? Manual W…
http://www.aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events EventBus EventBus是个单例,获得EventBus的引用可有下面两个方法: 默认的EventBus实例,使用EventBus.Default即可找到它. EventBus.Default.Trigger(...); //trigger an event 为单元测试考虑,更好的做法是通过依赖注入,获得EventBus的引用,下面是通过属性注入…
本节目录 原理介绍 Abp源码分析 代码实现 原理介绍 事件总线大致原理: (1)       在事件总线内部维护着一个事件与事件处理程序相映射的字典. (2)       利用反射,事件总线会将实现了IEventHandler的处理程序与相应事件关联到一起,相当于实现了事件处理程序对事件的订阅. (3)       当发布事件时,事件总线会从字典中找出相应的事件处理程序,然后利用反射去调用事件处理程序中的方法. Abp源码分析 1.AbpKernelModule的Initialize方法 2.…
在AbpBootstrapper中的两个至关重要的属性:IIocManager 和 IAbpModuleManager  public class AbpBootstrapper : IDisposable { /// <summary> /// Gets IIocManager object used by this class. /// </summary> public IIocManager IocManager { get; private set; } /// <…
一个业务功能往往不只由一次数据库请求(或者服务调用)实现.为了功能的完整性,我们希望如果该功能执行一半时出错,则撤销前面已执行的改动.在数据库层面上,事务管理实现了这种完整性需求.在ABP中,一个完整的业务功能称为一个工作单元(Unit of Work,简称UoW).工作单元代表一种完整的.原子性的操作.即一个工作单元包含的步骤要么全部被执行,要么都不被执行.如果执行一半时出现异常,则必须讲已执行的步骤还原.通常我们将事务管理实现在工作单元中.下面我们从ABP源码入手研究如何使用工作单元. AB…
一.简要说明 ABP vNext 框架在使用依赖注入服务的时候,是直接使用的微软提供的 Microsoft.Extensions.DependencyInjection 包.这里与原来的 ABP 框架就不一样了,原来的 ABP 框架还需要抽象出来一个 IIocManager 用来管理整个 IoC 容器,现在则直接操作 IServiceCollection 与 IServiceProvider 进行组件的注册/解析. 这里需要注意的是,虽然现在的依赖注入服务是使用微软官方那一套库进行操作,但是 A…
0.简要介绍 在 Abp 框架里面,无时无刻不存在依赖注入,关于依赖注入的作用与好处我就不在这里多加赘述了,网上有很多解释的教程.在 [Abp 源码分析]一.Abp 框架启动流程分析 里面已经说过,Abp 本身在框架初始化的时候我们就可以看到它使用 Castle Windsor 将 Asp.Net Core 自带的 IServiceProvider 替换掉了. 1.大体结构 在 Abp 框架当中,它的依赖注入相关的类型基本上都放在 Abp 项目的 Dependency 文件夹里面,下图是他们之间…
0.简介 事件总线就是订阅/发布模式的一种实现,本质上事件总线的存在是为了降低耦合而存在的. 从上图可以看到事件由发布者发布到事件总线处理器当中,然后经由事件总线处理器调用订阅者的处理方法,而发布者和订阅者之间并没有耦合关系. 像 Windows 本身的设计也是基于事件驱动,当用户点击了某个按钮,那么就会触发相应的按钮点击事件,而程序只需要监听这个按钮点击事件即可进行相应的处理,而事件被触发的时候往往都会附带相应的事件源,事件所产生的数据等. 还是以按钮被点击为例,该事件被触发的时候会装填上触发…
一.背景 你说我 Castle Windsor 库用得好好的,为啥要大费周章的替换成 DryIoc 库呢?那就是性能,DryIoc 是一款优秀而且轻量级的 DI 框架,整个项目代码就两个文件,加起来代码 1 万行左右(PS: 大部分都是注释). 在各个 Ioc 容器的 性能评测 当中,DryIoc 以其优异的性能成为我选择使用他的原因.Abp 使用的 Castle Windsor 在解析复杂对象的时候,速度非常慢,而替换为 DryIoc 之后速度可以提升 150% 以上. [注意] 本文仅对 .…
Introduction We are creating different applications based on different needs. But implementing common and similar structures over and over again, at least in some level. Authorization, Validation, Exception Handling, Logging,Localization, Database Co…
Introduction ASP.NET Boilerplate provides an infrastructure to build modules and compose them to create an application. A module can depend on another module. Generally, an assembly is considered as a module. If you created an application with more t…
ASP.NET Boilerplate provides an infrastructure and a model to configure it and modules on startup. ASP.NET提供了一个基础和样板模型配置和模块启动. Configuring ASP.NET Boilerplate Configuring ASP.NET Boilerplate is made on PreInitialize event of your module. Example conf…
What is Dependency Injection If you already know Dependency Injection concept, Constructor and Property Injection patterns, you can skip to the next section. Wikipedia says: "Dependency injection is a software design pattern in which one or more depe…
Introduction Every application need to store some settings and use these settings in somewhere in the application. ASP.NET Boilerplate provides a strong infrastructure to store/retrieve application, tenant and user level settings usable both in serve…
Introduction It's a common to map a similar object to another object. It's also tedious and repeating since generally both objects (classes) may have similar/same properties mapped to each other. Think on a typical application servicemethod below: 将相…
In C#, a class can define own events and other classes can register it to be notified when something happen. This is useful for a desktop application or standalone windows service. But, for a web application it's a bit problematic since objects are c…
Application Services are used to expose domain logic to the presentation layer. An Application Service is called from presentation layer with a DTO (Data Transfer Object) as parameter, uses domain objects to perform some specific business logic and r…
Introduction Almost all enterprise applications use authorization in some level. Authorization is used to check if a user is allowed to perform some specific operation in the application. ASP.NET Boilerplate defines a permission basedinfrastructure t…
Building Dynamic Web API Controllers This document is for ASP.NET Web API. If you're interested in ASP.NET Core, see ASP.NET Core documentation. ASP.NET Boilerplate can automatically generate ASP.NET Web API layer for your application layer. Say that…
Introduction This document is for ASP.NET MVC and Web API. If you're interested in ASP.NET Core, see ASP.NET Core documentation. In a web application, exceptions are usually handled in MVC Controller actions and Web API Controller actions. When an ex…
Introduction Any application has at least one language for user interface. Many applications have more than one. ASP.NET Boilerplate provides a flexible localization system for an application. 任何应用程序至少有一种用于用户界面的语言.许多应用程序有多个.ASP.NET样板提供了一种柔性定位系统中的应用.…
Introduction(介绍) Abp.EntityFrameworkCore nuget package is used to integrate to Entity Framework (EF) Core ORM framework. After installing this package, we should also add a DependsOn attribute for AbpEntityFrameworkCoreModule. abp.entityframeworkcore…
ABP中有很多惯例,如果使用得当,可以事半功倍,如果使用不当,也会有很大的麻烦,是否适当其实还是要看Need需求 ASP.NET Boilerplate (ABP) is an open source and well documented application framework started idea of "developing a common framework for all companies and all developers!" It's not just a…
从ABP官网下载的Zero的多语言配置默认是使用XML文件的,实际使用中XML是没有Json简洁明了的,所以我们将其修改为Json格式. 修改MyLocalizationConfigurer.cs文件 我们在Core-Localization下找到LocalizationConfigurer.cs文件,将其替换为: public static void Configure(ILocalizationConfiguration localizationConfiguration) { //获得dl…
感谢园友 @turingguo 发布的 https://www.cnblogs.com/turingguo/p/9019026.html  文章,详细介绍了ABP Zero集成微信小程序登陆的实现过程. 经测试,abp的外部登陆有几处bug,在此做记录. 1.xxxxWebHostModule.cs文件 public override void PostInitialize() { if (!IocManager.Resolve<IMultiTenancyConfig>().IsEnabled…