DINC0663527: Service name type should be included #335
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This way @ServiceName(value = "", type = ApplicationService.class) of declaring things is the appropriate way. @ServiceName() doesn’t make any sense. We use the same approach for all our built-in handlers in CAP Java itself, e.g. see all handlers here: https://github.wdf.sap.corp/cds-java/cds-services/tree/main/cds-services-impl/src/main/java/com/sap/cds/services/impl/cds
This way just means that you register on all services that are served as APIs by the application. There are many many other types of services in CAP (not only Messaging, but many more), which a plain @ServiceName(*) would all register to. This doesn’t make sense for an action handler.
This approach is also the right way completely independent if an application uses Messaging or not.
Describe your changes
Any documentation
Type of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested
Ran all the integration tests
