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
Where it sits
Who is behind it
In the atlas: maintains 20, wrote 1@capiremaintainerAdrian GörlerContributes to this
In the atlas: contributes to 4@agoerlerJohannes VogtContributes to this
In the atlas: maintains 1, contributes to 28, wrote 10@AkatuoroMarc BeckerContributes to this
In the atlas: contributes to 7@beckermarcBraunMatthiasContributes to this
In the atlas: contributes to 8@BraunMatthiasDavid H LamContributes to this
In the atlas: contributes to 5@davidhunglamMatthias SchurContributes to this
In the atlas: contributes to 4@MattSchurMarkus OfterdingerContributes to this
In the atlas: contributes to 6@mofterdingerRobinContributes to this
In the atlas: contributes to 8@rjayasinghesjvansContributes to this
In the atlas: contributes to 45@sjvansStefan HenkeContributes to this
In the atlas: contributes to 6@StefanHenke12 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
As a sample
- Form
- does not say
Connections
Whole applications to read rather than snippets to copy
Download
Architecture
as mta.yaml states it at 655bca6, readDownload
ias redirects to the IAS login.If A route sets authenticationType to ias.Bound, and not drawn
- xtravels-srvCloud Identity Services, hana
- xtravels-ams-policies-deployerCloud Identity Services
- xtravels-db-deployerhana
Documented, with no instance in the document
- @sap/approuter requires SAP Authorization and Trust Management servicextravelsAuthenticating the user on the routes configured to require it: the router binds to it as the UAA server, or to Cloud Identity Services instead.@sap/approuter 23.0.0 — README, user authentication
The User Account and Authentication (UAA) server is responsible for user authentication.
- @sap/approuter requires SAP Destination servicextravelsReading the destination a route forwards to, where that configuration is not written into the router's own environment.@sap/approuter 23.0.0 — README, destination configuration
Destination configuration can also be read from `destination service`.
- @sap/approuter requires SAP Connectivity servicextravelsForwarding to an on-premise backend: the binding is required once a destination sets its ProxyType to on-premise.@sap/approuter 23.0.0 — README, destination ProxyType
if ProxyType set to `on-premise`, binding to SAP Cloud Platform connectivity service is required.
- @sap/approuter requires SAP HTML5 Application Repository service for SAP BTPxtravelsServing static content from the repository rather than from the router's own folder. Bound, both the files and the xs-app.json routes come from there.@sap/approuter 23.0.0 — README, Integration with HTML5 Application Repository
When the application router interacts with HTML5 Application Repository to serve HTML5 Applications, all static content and routes (xs-app.json) are retrieved from HTML5 Application Repository.
Bound in the descriptor, not joined to an entry
hana
README
quoted from capire/xtravels-java under Apache-2.0, read@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:
-
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 -
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 -
Install NPM dependencies:
npm install -
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.
Details
Sources
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
Flavors
“A travel booking application built with CAP Java using master data provided by” — capire/xtravels-java — README
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:capire-xtravels-java- JSON
- /artifacts/capire-xtravels-java.json
- MCP
- Connecting an agent