Skip to content

Commit adbffd4

Browse files
rjayasingherenejeglinskyBraunMatthiasbeckermarc
authored
alesi documentation (#2352)
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com> Co-authored-by: BraunMatthias <59841349+BraunMatthias@users.noreply.github.com> Co-authored-by: Marc Becker <marc.becker@sap.com>
1 parent 8f99e57 commit adbffd4

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

java/_menu.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# [Multitenancy](multitenancy)
2525
# [Security](security)
2626
# [Spring Boot Integration](spring-boot-integration)
27+
## [CAP plugins w/o CDS Model](cap-plugins-in-spring-boot-apps)
2728
# [Developing Applications](developing-applications/)
2829
## [Building](developing-applications/building)
2930
## [Running](developing-applications/running)
@@ -37,4 +38,4 @@
3738
# [Integrating Applications](../../java/integrating-applications/) <!-- INTERNAL -->
3839
## [Unified Customer Landscape](../../java/integrating-applications/ucl) <!-- INTERNAL -->
3940
# [Building Plugins](building-plugins)
40-
# [Migration Guides](migration)
41+
# [Migration Guides](migration)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
synopsis: >
3+
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.
4+
status: released
5+
---
6+
7+
# Use CAP Plugins in Spring Boot Applications without a CDS Model
8+
9+
<style scoped>
10+
h1:before {
11+
content: "Java"; display: block; font-size: 60%; margin: 0 0 .2em;
12+
}
13+
</style>
14+
15+
<script setup>
16+
import { useData } from 'vitepress'
17+
const { theme } = useData()
18+
const { versions } = theme.value.capire
19+
</script>
20+
21+
{{ $frontmatter.synopsis }}
22+
23+
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.
24+
25+
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.
26+
27+
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:
28+
29+
```xml
30+
<dependency>
31+
<groupId>com.sap.cds</groupId>
32+
<artifactId>cds-framework-spring-boot</artifactId>
33+
<version>${cds.services.version}</version>
34+
<scope>runtime</scope>
35+
</dependency>
36+
```
37+
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:
38+
39+
```xml
40+
<dependency>
41+
<groupId>com.sap.cds</groupId>
42+
<artifactId>cds-services-api</artifactId>
43+
<version>${cds.services.version}</version>
44+
</dependency>
45+
46+
```
47+
48+
Also add a version property in your `<properties>` section:
49+
50+
```xml-vue
51+
<cds.services.version>{{ versions.java_services }}</cds.services.version>
52+
```
53+
54+
## SAP Audit Log Service
55+
56+
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.
57+
58+
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).
59+
60+
For details on how to use the audit log application programming interfaces in your application code, refer to the [Auditlog documentation](./auditlog).
61+
62+
## CAP Messaging
63+
64+
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.
65+
66+
With the two basic dependencies included, activate file-based messaging in the application configuration:
67+
68+
```yaml
69+
cds.messaging.services.messaging.kind: file-based-messaging
70+
```
71+
72+
After that, you can use the CAP messaging feature in your application. For details, refer to the [Messaging documentation](./messaging).
73+
74+
<div id="alesi-cds-feature-ucl" />

0 commit comments

Comments
 (0)