generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 149
alesi documentation #2352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rjayasinghe
wants to merge
33
commits into
main
Choose a base branch
from
alesi_java_docu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+76
−1
Open
alesi documentation #2352
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
82bf818
start of the alesi documentation
rjayasinghe 62dab3c
messaging section WIP
rjayasinghe 28d0cdf
Update java/_menu.md
rjayasinghe 79747ba
messaging section
rjayasinghe cef7eda
add link to event hub plugin
rjayasinghe 4b3ab9e
rework first part and continue outbox
rjayasinghe 966b00b
updates for the outbox section
rjayasinghe 57598c5
rewriting introduction section
rjayasinghe 9f66d2d
smaller updates
rjayasinghe 2fcb58a
updated synopsis
rjayasinghe 4d46e52
rewrote the outbox section
rjayasinghe 5599382
move ucl docu to internal fragment
rjayasinghe c762399
Apply suggestions from code review
rjayasinghe 667fe0f
update introduction section
rjayasinghe 42e27f8
Merge remote-tracking branch 'origin/main' into alesi_java_docu
rjayasinghe 5d3012f
add links
rjayasinghe 2653ce0
fix link
rjayasinghe 7b1d0b1
fix links
rjayasinghe 2c13a7a
Merge branch 'main' into alesi_java_docu
rjayasinghe c8d2341
latest cap java version
rjayasinghe f5a5749
Merge branch 'main' into alesi_java_docu
rjayasinghe 7a875d9
Merge branch 'main' into alesi_java_docu
rjayasinghe 1d9f310
updates
rjayasinghe 923da7c
strip down the section and point to docu instead
rjayasinghe 00d75d2
shorten menu item
rjayasinghe 115e3ad
Merge remote-tracking branch 'origin/main' into alesi_java_docu
rjayasinghe 2068d95
try to fix links
rjayasinghe 3b7d16f
renamed headlines and stripped the guide
rjayasinghe e62735a
spelling
rjayasinghe 46a8b6c
Update java/cap-plugins-in-spring-boot-apps.md
rjayasinghe 5db8e72
dynamic version
rjayasinghe 3195b1b
Merge branch 'main' into alesi_java_docu
rjayasinghe 83cb6e0
editing
renejeglinsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| synopsis: > | ||
| This guide shows how Spring Boot applications that run without a CDS model can integrate with service offerings on SAP BTP by using CAP plugins without a full migration to CAP Java. | ||
| status: released | ||
| --- | ||
|
|
||
| # Use CAP Plugins in Spring Boot Applications without a CDS Model | ||
|
|
||
| <style scoped> | ||
| h1:before { | ||
| content: "Java"; display: block; font-size: 60%; margin: 0 0 .2em; | ||
| } | ||
| </style> | ||
|
|
||
| <script setup> | ||
| import { useData } from 'vitepress' | ||
| const { theme } = useData() | ||
| const { versions } = theme.value.capire | ||
| </script> | ||
|
|
||
| {{ $frontmatter.synopsis }} | ||
|
|
||
| CAP Java offers a [variety of plugins that integrate with SAP BTP services](../plugins/) and keep your application free of hard-coded service dependencies. In the CAP ecosystem, this approach is called [Calesi (CAP level service integration)](../get-started/concepts#the-calesi-pattern). Most Calesi plugins expose a CAP service that you can inject as a Spring Boot component. As the CAP runtime can run alongside a Spring Boot application without a CDS model, this lets you use proven service integration through CAP plugins with a growing set of SAP BTP services. | ||
|
|
||
| In most cases, you add a CAP Java plugin by adding one or more dependencies to your application `pom.xml` and by adding configuration to `application.yaml` or another mechanism for [Spring Boot configuration](https://docs.spring.io/spring-boot/reference/features/external-config.html). The following sections show examples of how to use the core CAP Java runtime and CAP plugins to integrate a Spring Boot application with different SAP BTP services. | ||
|
|
||
| To use any CAP Java plugin in a Spring Boot application, include two Maven dependencies. The first dependency is the core CAP Java runtime with its Spring Boot integration: | ||
|
|
||
| ```xml | ||
| <dependency> | ||
| <groupId>com.sap.cds</groupId> | ||
| <artifactId>cds-framework-spring-boot</artifactId> | ||
| <version>${cds.services.version}</version> | ||
| <scope>runtime</scope> | ||
| </dependency> | ||
| ``` | ||
| This boots the CAP Java runtime when your Spring Boot application starts. To interact with CAP and its plugins, add an additional dependency for the CAP Java application programming interface artifact: | ||
|
|
||
| ```xml | ||
| <dependency> | ||
| <groupId>com.sap.cds</groupId> | ||
| <artifactId>cds-services-api</artifactId> | ||
| <version>${cds.services.version}</version> | ||
| </dependency> | ||
|
|
||
| ``` | ||
|
|
||
| Also add a version property in your `<properties>` section: | ||
|
|
||
| ```xml-vue | ||
| <cds.services.version>{{ versions.java_services }}</cds.services.version> | ||
| ``` | ||
|
|
||
| ## SAP Audit Log Service | ||
|
|
||
| CAP audit log support lets your application write audit log messages for relevant operations. The audit log application programming interfaces and the local default implementation are already part of the basic dependencies. | ||
|
|
||
| The SAP Audit Log service implementation for SAP BTP integrates with the CAP Java audit log application programming interfaces and is available as an additional plugin. Learn more in the [plugin documentation](https://github.com/cap-java/cds-feature-auditlog-ng). | ||
|
|
||
| For details on how to use the audit log application programming interfaces in your application code, refer to the [Auditlog documentation](./auditlog). | ||
|
|
||
| ## CAP Messaging | ||
|
|
||
| The CAP framework offers an abstraction layer for messaging services. CAP applications can emit events and messages to a `MessagingService` regardless of the target messaging infrastructure. The local default implementation for messaging is part of the basic dependencies mentioned in the previous sections and uses the file system as the communication layer. This means you do not need a dedicated message broker for local development. | ||
|
|
||
| With the two basic dependencies included, activate file-based messaging in the application configuration: | ||
|
|
||
| ```yaml | ||
| cds.messaging.services.messaging.kind: file-based-messaging | ||
| ``` | ||
|
|
||
| After that, you can use the CAP messaging feature in your application. For details, refer to the [Messaging documentation](./messaging). | ||
|
|
||
| <div id="alesi-cds-feature-ucl" /> | ||
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.
Uh oh!
There was an error while loading. Please reload this page.