mirror of https://github.com/abpframework/abp.git
committed by
GitHub
2 changed files with 95 additions and 0 deletions
@ -0,0 +1,94 @@ |
|||||
|
# ABP Version 7.4 Migration Guide |
||||
|
|
||||
|
This document is a guide for upgrading ABP v7.3 solutions to ABP v7.4. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. |
||||
|
|
||||
|
## Renamed the `AddGlobalFilters<>` method as `FilterQueryable<>` in `IMongoDbRepositoryFilterer` |
||||
|
|
||||
|
ABP Framework provides services to automatically filter data on querying from a database. Prior to this version, creating a new class that derives from the `MongoDbRepositoryFilterer` and overriding its `AddGlobalFilters` method was needed for implementing a data filter for [MongoDB](../MongoDB.md). |
||||
|
|
||||
|
In this version, the `AddGlobalFilters<>` method is renamed as `FilterQueryable<>`. Therefore, you need to update the method name if you have used data filtering for MongoDB, in your application. |
||||
|
|
||||
|
## Exposing Integration Services |
||||
|
|
||||
|
[Integration Services](../Integration-Services.md) are now not being exposed by default. In a monolith application, integration services don't need to be exposed outside since the modules would probably be in-process communication with each other. Therefore, they don't need to be exposed for most of the time. |
||||
|
|
||||
|
If you build a microservice solution or you need to access an integration service via a network call from any other application, you will probably need to expose the integration services so the other applications can consume them. |
||||
|
|
||||
|
To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpAspNetCoreMvcOptions>(options => |
||||
|
{ |
||||
|
options.ExposeIntegrationServices = true; |
||||
|
}); |
||||
|
``` |
||||
|
|
||||
|
## `LocalizationResource` property removed from the `TemplateDefinition` class |
||||
|
|
||||
|
In this version, the `LocalizationResource` property was removed from the `TemplateDefinition` class and instead, the `LocalizationResourceName` property has been added. |
||||
|
|
||||
|
```diff |
||||
|
- public Type LocalizationResource { get; set; } |
||||
|
+ public string LocalizationResourceName { get; set; } |
||||
|
``` |
||||
|
|
||||
|
## Changed the method signature for `ICorrelationIdProvider.Get()` |
||||
|
|
||||
|
Prior to this version, the `ICorrelationIdProvider.Get()` method used to return a non nullable string that represented a *correlationId* (a unique key that is used in distributed applications to trace requests across multiple services/operations). In this version, this method may return `null` if it hasn't been generated by `AbpCorrelationIdMiddleware` before. |
||||
|
|
||||
|
```diff |
||||
|
public interface ICorrelationIdProvider |
||||
|
{ |
||||
|
|
||||
|
- [NotNull] string Get(); |
||||
|
+ string? Get(); |
||||
|
|
||||
|
//other methods |
||||
|
|
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
Therefore, if you've used this method in your application, you might want to make a null check and update the method signature where it's used. |
||||
|
|
||||
|
> See [#16795](https://github.com/abpframework/abp/pull/16795) for more information. |
||||
|
|
||||
|
## Dynamic Setting Store - Setting Management Module |
||||
|
|
||||
|
In this version, ABP Framework introduces Dynamic Setting Store, which is an important feature that allows us to collect and get all setting definitions from a single point. This feature requires some actions that need to be taken care of as the following: |
||||
|
|
||||
|
* You need to create a new migration and apply it to your database because a new database table has been added. |
||||
|
* `ISettingDefinitionManager`'s sync methods have been removed and instead, asynchronous versions of the existing methods have been added. |
||||
|
|
||||
|
```diff |
||||
|
public interface ISettingDefinitionManager |
||||
|
{ |
||||
|
- SettingDefinition Get([NotNull] string name); |
||||
|
+ Task<SettingDefinition> GetAsync([NotNull] string name); |
||||
|
|
||||
|
- IReadOnlyList<SettingDefinition> GetAll(); |
||||
|
+ Task<IReadOnlyList<SettingDefinition>> GetAllAsync(); |
||||
|
|
||||
|
- SettingDefinition? GetOrNull(string name); |
||||
|
+ Task<SettingDefinition?> GetOrNullAsync([NotNull] string name); |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
## `IdentityUserIntegrationService` - Identity Module |
||||
|
|
||||
|
In this version, ABP Framework introduces the `IdentityUserIntegrationService`, which is designed to get the current user's information, such as his/her role names within a non-authorized integration service. |
||||
|
|
||||
|
> For more information, see the related PR: [#16962](https://github.com/abpframework/abp/pull/16962) |
||||
|
|
||||
|
This is a breaking change for microservice solutions because of the following two reasons and it should be considered: |
||||
|
|
||||
|
* `IdentityUserIntegrationService` provides non-authorized services. This is not breaking the application, but should be taken care of. Since, everyone can use the service to retrieve some information for a certain user (for example, the role names of a user). |
||||
|
* Secondly, since integration services are not exposed by default anymore as explained in the *Exposing Integration Services* section above, you should explicitly enable exposing integration services. Otherwise, the operation will fail and you'll get a `404` error from the identity microservice. |
||||
|
|
||||
|
To expose integration services and controllers, you can configure the `AbpAspNetCoreMvcOptions` and set the `ExposeIntegrationServices` property as *true* in the `ConfigureServices` method of your [module class](../Module-Development-Basics.md): |
||||
|
|
||||
|
```csharp |
||||
|
Configure<AbpAspNetCoreMvcOptions>(options => |
||||
|
{ |
||||
|
options.ExposeIntegrationServices = true; |
||||
|
}); |
||||
|
``` |
||||
Loading…
Reference in new issue