mirror of https://github.com/abpframework/abp.git
2 changed files with 90 additions and 0 deletions
@ -0,0 +1,89 @@ |
|||
# 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 `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. |
|||
|
|||
In this version, the `AddGlobalFilters` method 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. Hiding integration services is useful because in a monolith application, integration services don't need to be exposed outside since the modules probably would be in-process communication with each other. Therefore, from this version on, the integration services will not be exposed as endpoints by default. |
|||
|
|||
If you build a microservice solution, or you need to access an integration service via a network call from any other application, you probably will 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` removed from the `TemplateDefinition` class |
|||
|
|||
In this version, the `LocalizationResource` property (`Type`) removed from the `TemplateDefinition` class and instead the `LocalizationResourceName` property (`string`) has been added. |
|||
|
|||
## Changed method signature for `ICorrelationIdProvider.Get()` |
|||
|
|||
Prior to this version, `ICorrelationIdProvider.Get()` method was returning not nullable string that represents a *correlationId* (a unique key that used in distributed applications to trace requests accross multiple services/operations). With this version, now this method may return `null` if hasn't been generated by `AbpCorrelationIdMiddleware` before. |
|||
|
|||
```diff |
|||
public interface ICorrelationIdProvider |
|||
{ |
|||
|
|||
- [NotNull] string Get(); |
|||
+ string? Get(); |
|||
|
|||
//other methods |
|||
|
|||
} |
|||
``` |
|||
|
|||
Therefore, if you used this method in your application, you might want to make a null check for the method result. |
|||
|
|||
> 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 allow 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 in 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 asynchrounus 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 current user's information such as his/her role names within a non-authorized integration service. This was need to prevent multiple calls to both permission and identity microservices, to be able to use the remote identity 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 cared: |
|||
|
|||
* `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 informations for a certain user (for example, 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 be failed and you 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