SampleSampletypeA worked example you read or clone. Evidence: it demonstrates, it never provides.See every one →What this type is →by SAPby SAPoriginPublished by SAP itself. A visible facet, never an input to a reading — a dormant official plugin reads exactly like a dormant independent one.See every one →Starting point

xtravels-java

The Java twin of xtravels: a Spring Boot travel-booking application built on master data from xflights-java, which CAP mocks automatically unless a hybrid profile connects a running instance.

mvn package builds it, then running the Application class starts it at localhost:8080, with the xflights dependency mocked automatically by CAP unless a hybrid Spring profile is set to connect it to a running xflights-java instance instead. Both Maven and npm dependencies for the capire packages are resolved through GitHub's own package registries, the same registry pattern the Node xtravels uses for its own dependency.

Facts

Last pushLicenceApache-2.0

Where it sits

Lives in
Demonstrates
Reference appsCAPReference appscapabilityA whole application to read rather than a snippet to copy — somewhere to see how the pieces sit together once there are more than three of them.
Flavors

Who is behind it

Capire Docs & SamplesCapire Docs & SamplesOrganisationMaintains this
In the atlas: maintains 20, wrote 1
@capire
maintainerAdrian GörlerPersonContributes to this
In the atlas: contributes to 4
@agoerler
Johannes VogtPersonContributes to this
In the atlas: maintains 1, contributes to 28, wrote 10
@Akatuoro
Marc BeckerPersonContributes to this
In the atlas: contributes to 7
@beckermarc
BraunMatthiasPersonContributes to this
In the atlas: contributes to 8
@BraunMatthias
David H LamPersonContributes to this
In the atlas: contributes to 5
@davidhunglam
Matthias SchurPersonContributes to this
In the atlas: contributes to 4
@MattSchur
Markus OfterdingerPersonContributes to this
In the atlas: contributes to 6
@mofterdinger
RobinPersonContributes to this
In the atlas: contributes to 8
@rjayasinghe
sjvansPersonContributes to this
In the atlas: contributes to 45
@sjvans
Stefan HenkePersonContributes to this
In the atlas: contributes to 6
@StefanHenke
12 contributors

What it declares

Every artifact

Type
Sample
Origin
By SAP

As a sample

Form
does not say

Connections1

xtravels-java connectionsxtravels-javaPROVIDES→ demonstrates1demonstrates authoredReference apps

ArchitectureBetaRead from the sample's deployment descriptor. Some of the connections it states are not drawn yet.

as mta.yaml states it at 655bca6, read
SAP BTP, Cloud Foundry Runtimextravelsmta.yaml, module xtravels, requires xtravels-iasbindingoutboundif A route setsauthenticationType to `ias`mta.yaml, module xtravels, requires srv-apisrv-apiCloud Identity Services, identity, applicationCloud IdentityServicesxtravels-srv, javaxtravels-srvxtravels, approuter.nodejsxtravelsxtravels-ams-policies-deployer, javascript.nodejsxtravels-ams-policie…xtravels-db-deployer, hdbxtravels-db-deployerhana, hana, hdi-sharedhana
SAPnot SAP's, or the project's ownauthenticationstated in the document

Bound, and not drawn

Documented, with no instance in the document

Bound in the descriptor, not joined to an entry

hana

README

quoted from capire/xtravels-java under Apache-2.0, read
capire/xtravels-java/README.mdOn GitHub

@capire/xtravels-java

A travel booking application built with CAP Java using master data provided by capire/xflights-java.

Get it

git clone https://github.com/capire/xtravels-java
cd xtravels-java
mvn package

The package has dependencies to other capire packages, including sap.capire/xflights-data, that can be pulled from GitHub Packages or from a local workspace setup as follows...

Using GitHub Packages

Reuse packages among the capire samples are published to the GitHub Packages registry. This includes Maven packages as well as NPM packages.

Authenticate for Maven

Authenticate to GitHub's Maven repository by adding the following to your ~/.m2/settings.xml:

<servers>
  <!-- ... -->
  <server>
    <id>github</id>
    <username>USERNAME</username>
    <password>TOKEN</password>
  </server>
</servers>

As password you're using a Personal Access Token (classic) with read:packages scope. Read more about it in Authenticating to GitHub Packages.

Authenticate for NPM

Run npm login once like that:

npm login --scope=@capire --registry=https://npm.pkg.github.com

When prompted for a password enter a Personal Access Token (classic) with read:packages scope. Learn more about that in Authenticating to GitHub Packages.

A successfull npm login adds entries like that to your local ~/.npmrc file, which allow you to npm install @capire packages subsequently using npm add or npm install as usual:

@capire:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=<generated token>
Using Workspaces

Alternatively you can work with related packages in local workspace setups like so:

  1. Create a workspace root for NPM, e.g. at cap/samples-java:

    mkdir -p cap/samples-java && cd cap/samples-java
    echo '{"workspaces":["*","*/apis/*"]}' > package.json
  2. Add related projects:

    git clone https://github.com/capire/xtravels-java
    git clone https://github.com/capire/xflights-java
    git clone https://github.com/capire/common
  3. Install NPM dependencies:

    npm install
  4. Install Maven dependencies:

    cd xflights-java && mvn install

For Maven, this will share cross dependencies between projects via your local Maven repository placed at ~/.m2. For NPM, this will install all dependencies of all cloned projects, with cross dependencies between them being symlinked automatically by npm install.

Run it

To start the xtravels application, run the Application class in your preferred IDE. Alternatively, execute mvn spring-boot:run on the command line.

Click the http://localhost:8080 link in the terminal to open the app in a browser.

The dependencies to the xflights application are mocked automatically by CAP.

With xflights

You can also connect the xtravels application to a locally running xflights application.

Start the xflights application first, then start the xtravels application with the Spring Boot profiles default and hybrid. It is recommended to configure the Spring Profiles in your IDE. For VS Code you can add the following to your launch configurations:

{
  "type": "java",
  "name": "xtravels (hybrid)",
  "request": "launch",
  "mainClass": "sap.capire.xtravels.Application",
  "vmArgs": "-Dspring.profiles.active=default,hybrid"
}

Alternatively start the application on the command line by executing:

mvn spring-boot:run -Dspring-boot.run.profiles=default,hybrid

Additional Examples

For more (extensive) examples, have a look at the readme file in the xmpls folder.

License

Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

Apache-2.0, read

Details

Sources3
Added by handdiscovered herechecked
github.com/capire/xtravels-javatree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, learning-and-reference
Flavors1
Java
“A travel booking application built with CAP Java using master data provided by” — capire/xtravels-java — READMEchecked
Contributors12
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:capire-xtravels-java
JSON
/artifacts/capire-xtravels-java.json
MCP
Connecting an agent