Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions src/frontend/config/sidebar/integrations.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,10 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
label: 'Set up Java apps in the AppHost',
slug: 'integrations/frameworks/java/java-host',
},
{
label: 'Connect to Java apps',
slug: 'integrations/frameworks/java/java-connect',
},
],
},
{
Expand Down Expand Up @@ -1500,6 +1504,10 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
label: 'Set up Rust apps in the AppHost',
slug: 'integrations/frameworks/rust/rust-host',
},
{
label: 'Connect to Rust apps',
slug: 'integrations/frameworks/rust/rust-connect',
},
],
},
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@
"updated": 1742813104835,
"link": null,
"locked": false,
"text": "App Host",
"text": "AppHost",
"fontSize": 20,
"fontFamily": 6,
"textAlign": "left",
"verticalAlign": "top",
"containerId": null,
"originalText": "App Host",
"originalText": "AppHost",
"autoResize": true,
"lineHeight": 1.35
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions src/frontend/src/components/SimpleAppHostCode.shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ var postgres = builder.AddPostgres("db")
.WithDataVolume();

// Add API service and reference the database
var api = builder.AddSpringApp("api", "../api", "otel.jar")
.WithHttpEndpoint(port: 8080)
var api = builder.AddSpringBootApp("api", "../api")
.WithReference(postgres)
.WaitFor(postgres);

Expand Down
13 changes: 6 additions & 7 deletions src/frontend/src/content/docs/get-started/app-host.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ architecture-beta
This architecture demonstrates a **Java API** (using Spring Boot) connecting to a **PostgreSQL database**, with a **React frontend** consuming the API. The Java API uses Spring Boot with Spring Data JPA and connects to PostgreSQL using JDBC or Spring Data. The React frontend is built with Vite and communicates with the API over HTTP.

<Aside type="tip">
The Java integration is provided by the [CommunityToolkit.Aspire.Hosting.Java](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Java) NuGet package. Learn more in the [Java integration](/integrations/frameworks/java/java-get-started/) documentation.
The Java integration is provided by the [Aspire.Hosting.Java](https://www.nuget.org/packages/Aspire.Hosting.Java) NuGet package. Learn more in the [Java integration](/integrations/frameworks/java/java-get-started/) documentation.
</Aside>

</Pivot>
Expand Down Expand Up @@ -172,7 +172,7 @@ You can represent that architecture in an AppHost like this:
</Pivot>
<Pivot id="java">
<SimpleAppHostCode lang="java">
<p>Uses <code>AddSpringApp()</code> for Spring Boot applications.</p>
<p>Uses <code>AddSpringBootApp()</code> for Spring Boot applications.</p>
</SimpleAppHostCode>
</Pivot>

Expand Down Expand Up @@ -346,7 +346,7 @@ With the builder ready, define resources and services. The snippet below shows h
</SimpleAppHostCode>
</Pivot>
<Pivot id="java">
<SimpleAppHostCode lang="java" mark={{ range: '4-6' }} collapse={['8-18']}>
<SimpleAppHostCode lang="java" mark={{ range: '4-6' }} collapse={['8-17']}>
<div>
<p><strong>How this works:</strong></p>
<ul>
Expand Down Expand Up @@ -448,12 +448,11 @@ Next, register the API service and wire it to the PostgreSQL resource with <ApiR
</SimpleAppHostCode>
</Pivot>
<Pivot id="java">
<SimpleAppHostCode lang="java" mark={{ range: '9-12' }} collapse={['1-6', '14-18']}>
<SimpleAppHostCode lang="java" mark={{ range: '9-11' }} collapse={['1-6', '13-17']}>
<div>
<p><strong>What this does:</strong></p>
<ul>
<li><code>AddSpringApp("api", "../api", "otel.jar")</code> registers a Spring Boot app named <code>api</code>.</li>
<li><code>WithHttpEndpoint(port: 8080)</code> exposes the Spring Boot app on port <code>8080</code>.</li>
<li><code>AddSpringBootApp("api", "../api")</code> registers a Spring Boot app named <code>api</code> and declares an HTTP endpoint whose port Aspire passes to the app through the <code>SERVER_PORT</code> environment variable.</li>
<li><code>WithReference(postgres)</code> injects connection details into the API configuration.</li>
<li><code>WaitFor(postgres)</code> delays the API startup until PostgreSQL is healthy.</li>
</ul>
Expand Down Expand Up @@ -544,7 +543,7 @@ This example uses a Node.js (React) frontend, but Aspire treats frontends as exe
</SimpleAppHostCode>
</Pivot>
<Pivot id="java">
<SimpleAppHostCode lang="java" mark={{ range: '15-17' }} collapse={['1-12']}>
<SimpleAppHostCode lang="java" mark={{ range: '14-16' }} collapse={['1-11']}>
<div>
<p><strong>Key points:</strong></p>
<ul>
Expand Down
Loading
Loading