Skip to content

Instantly share code, notes, and snippets.

View davidfowl's full-sized avatar

David Fowler davidfowl

View GitHub Profile

Aspire + Java Integration Proposal

See 2024 JetBrains Java Developer Survey and Spring Boot Statistics for context on the Java ecosystem.

Note: The Community Toolkit provides Java/Spring Boot hosting. Aspire 13 elevated Python and JavaScript to first-class citizens with polyglot connection properties including JDBC format. This proposal outlines bringing Java to the same first-class status.

Executive Summary

Java is the second most popular enterprise language after JavaScript/TypeScript, with Spring Boot dominating the web framework space (~70% of Java web applications). With Aspire 13's rebrand from ".NET Aspire" to "Aspire" and first-class Python/JavaScript support, Java is the natural next step. This document outlines a Spring Boot-centric approach while maintaining flexibility for other Java frameworks.

@davidfowl
davidfowl / LogCommand.cs
Created September 11, 2025 04:17
An aspire command for project resources to enable setting log configuration at dev time
#pragma warning disable ASPIREINTERACTION001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
using System.Text.Json;
using System.Text.Json.Nodes;
using Microsoft.Extensions.DependencyInjection;
namespace Aspire.Hosting
{
public static class ResourceBuilderProjectExtensions
{
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System.IO;
namespace Aspire.Hosting;
public static class DevCertHostingExtensions
{
/// <summary>
using Aspire.Hosting.Lifecycle;
using CommunityToolkit.Aspire.Hosting.Dapr;
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDapr();
builder.Services.AddLifecycleHook<FlowDaprSidecarAnnotations>();
var cache = builder.AddRedis("cache");
using System.Diagnostics.CodeAnalysis;
using Aspire.Hosting;
using Aspire.Hosting.ApplicationModel;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
namespace WizardDemo.AppHost;
/// <summary>
@davidfowl
davidfowl / dotnetinstall.cs
Created June 26, 2025 06:26
cli tool to install dotnet
#:package [email protected]
#:package [email protected]
using System.Text.Json;
using System.Text.Json.Serialization;
using Spectre.Console;
using NuGet.Versioning;
using System.Diagnostics;
// Business logic class for .NET installation
@davidfowl
davidfowl / react_cli.cs
Last active June 18, 2025 23:01
React like framework based on Spectre.Console
#:package [email protected]
using Spectre.Console;
using Spectre.Console.Rendering;
using System.Threading.Channels;
// Entry point
var app = new ConsoleApp();
app.Render(new App());
@davidfowl
davidfowl / cleanrg.cs
Created June 16, 2025 21:42
A C# tool for cleaning up resource groups
// -----------------------------------------------------------------------------
// Azure RG Janitor - Spectre Edition
// Run with: dotnet run cleanup-rg.cs
// Targets: .NET 10 Preview 4+
// -----------------------------------------------------------------------------
#:package Azure.Identity@1.*
#:package Azure.ResourceManager@1.*
#:package Spectre.Console@0.50.0
using System.Diagnostics;
using System.Reflection;
using System.Threading.Channels;
using Aspire.Hosting.Eventing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
public static class ProjectResourceBuilderExtensions
{
public static IResourceBuilder<ProjectResource> RestartOnChange(this IResourceBuilder<ProjectResource> builder, params string[] filePatterns)
@davidfowl
davidfowl / ResourceModel.md
Last active October 21, 2025 09:31
Aspire Resource Model: Concepts, Design, and Authoring Guidance