Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
82bf818
start of the alesi documentation
rjayasinghe Jan 29, 2026
62dab3c
messaging section WIP
rjayasinghe Jan 29, 2026
28d0cdf
Update java/_menu.md
rjayasinghe Jan 30, 2026
79747ba
messaging section
rjayasinghe Jan 30, 2026
cef7eda
add link to event hub plugin
rjayasinghe Jan 30, 2026
4b3ab9e
rework first part and continue outbox
rjayasinghe Feb 2, 2026
966b00b
updates for the outbox section
rjayasinghe Feb 3, 2026
57598c5
rewriting introduction section
rjayasinghe Feb 3, 2026
9f66d2d
smaller updates
rjayasinghe Feb 3, 2026
2fcb58a
updated synopsis
rjayasinghe Feb 4, 2026
4d46e52
rewrote the outbox section
rjayasinghe Feb 4, 2026
5599382
move ucl docu to internal fragment
rjayasinghe Feb 5, 2026
c762399
Apply suggestions from code review
rjayasinghe Feb 11, 2026
667fe0f
update introduction section
rjayasinghe Feb 11, 2026
42e27f8
Merge remote-tracking branch 'origin/main' into alesi_java_docu
rjayasinghe Feb 11, 2026
5d3012f
add links
rjayasinghe Feb 11, 2026
2653ce0
fix link
rjayasinghe Feb 11, 2026
7b1d0b1
fix links
rjayasinghe Feb 11, 2026
2c13a7a
Merge branch 'main' into alesi_java_docu
rjayasinghe Feb 11, 2026
c8d2341
latest cap java version
rjayasinghe Feb 12, 2026
f5a5749
Merge branch 'main' into alesi_java_docu
rjayasinghe Feb 24, 2026
7a875d9
Merge branch 'main' into alesi_java_docu
rjayasinghe Feb 24, 2026
1d9f310
updates
rjayasinghe Mar 4, 2026
923da7c
strip down the section and point to docu instead
rjayasinghe Mar 4, 2026
00d75d2
shorten menu item
rjayasinghe Mar 4, 2026
115e3ad
Merge remote-tracking branch 'origin/main' into alesi_java_docu
rjayasinghe Mar 4, 2026
2068d95
try to fix links
rjayasinghe Mar 4, 2026
3b7d16f
renamed headlines and stripped the guide
rjayasinghe Mar 5, 2026
e62735a
spelling
rjayasinghe Mar 5, 2026
46a8b6c
Update java/cap-plugins-in-spring-boot-apps.md
rjayasinghe Mar 5, 2026
5db8e72
dynamic version
rjayasinghe Mar 5, 2026
3195b1b
Merge branch 'main' into alesi_java_docu
rjayasinghe Mar 6, 2026
83cb6e0
editing
renejeglinsky Mar 6, 2026
e991bb4
shorter ToC title
renejeglinsky Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion java/_menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# [Multitenancy](multitenancy)
# [Security](security)
# [Spring Boot Integration](spring-boot-integration)
## [CAP plugins in plain Spring Boot](cap-plugins-in-spring-boot-apps)
# [Developing Applications](developing-applications/)
## [Building](developing-applications/building)
## [Running](developing-applications/running)
Expand All @@ -37,4 +38,4 @@
# [Integrating Applications](../../java/integrating-applications/) <!-- INTERNAL -->
## [Unified Customer Landscape](../../java/integrating-applications/ucl) <!-- INTERNAL -->
# [Building Plugins](building-plugins)
# [Migration Guides](migration)
# [Migration Guides](migration)
75 changes: 75 additions & 0 deletions java/cap-plugins-in-spring-boot-apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
synopsis: >
This guide shows how Spring Boot applications running without a CDS model can integrate themselves with service offerings of SAP BTP using different CAP plugins without the need to completely migrate to CAP Java.
status: released
---

# Use CAP Plugins in Spring Boot Apps 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 }}

One of the strengths of CAP Java is that it offers a [variety of plugins integrating with SAP BTP services](../plugins/) while keeping applications free of hard-coded dependencies to such services. In the CAP ecosystem, we call this approach [Calesi (CAP level service integration)](../get-started/concepts#the-calesi-pattern). Most of those Calesi plugins expose themselves as a CAP service which also can be injected as a Spring Boot component. Take this together with the fact that the CAP runtime can run alongside a Spring Boot application without any CDS model and you have robust and proven service integration (via CAP plugins) with a growing set of BTP platform services.

In general, adding a CAP Java plugin to your existing Spring Boot application is just adding one or more dependencies to the application's `pom.xml` as well as adding configuration to the application.yaml (or other mechanisms for [Spring Boot configuration](https://docs.spring.io/spring-boot/reference/features/external-config.html)). In the following sections we will discuss several examples on how to use the core CAP Java runtime and CAP plugin to integrate a Spring Boot application with different SAP BTP services.

The basic prerequisite for all CAP Java plugins to be used within a Spring Boot application is to include 2 Maven dependencies. The first one is the core CAP Java runtime together with it's integration into the Spring Boot framework:

```xml
<dependency>
<groupId>com.sap.cds</groupId>
<artifactId>cds-framework-spring-boot</artifactId>
<version>${cds.services.version}</version>
<scope>runtime</scope>
</dependency>
```
With that, the CAP Java runtime is bootstrapped during the start of the Spring Boot application. In order to interact with CAP and it's plugins you need an additional dependency to the API artifact of CAP Java:

```xml
<dependency>
<groupId>com.sap.cds</groupId>
<artifactId>cds-services-api</artifactId>
<version>${cds.services.version}</version>
</dependency>

```

Please also maintain a version property in your `<properties>` section:

```xml-vue
<cds.services.version>{{ versions.java_services }}</cds.services.version>
```

## SAP Audit Log Service
The CAP audit log support enables applications to write audit log messages for relevant operations. The audit log APIs and the local default implementation are already part of the basic dependencies you already included.

The implementation for the SAP Audit Log service on BTP integrates with the CAP Java audit log APIs and can be added as an additional plugin. Read more about that in the [plugin's documentation](https://github.com/cap-java/cds-feature-auditlog-ng).

For more information on how to use the audit log APIs in your application's code lease read our [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 already part of the above mentioned basic dependencies and uses the filesystem as the communication layer. Thus, no dedicated message broker is needed for local development.

With the 2 dependencies included you just need to activate the file-based messaging in the application's configuration:

```yaml
cds.messaging.services.messaging.kind: file-based-messaging
```

Once this is done, you can the CAP messaging feature in your application. Please read our documentation on [Messaging](./messaging) for more details.

<div id="alesi-cds-feature-ucl" />

##