{"id":22640969,"url":"https://github.com/aliencube/aspire-contribs","last_synced_at":"2025-10-13T04:11:44.265Z","repository":{"id":242853290,"uuid":"810677538","full_name":"aliencube/aspire-contribs","owner":"aliencube","description":"This is a collection of community contributed libraries for .NET Aspire","archived":false,"fork":false,"pushed_at":"2024-09-23T05:22:26.000Z","size":566,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T22:21:29.697Z","etag":null,"topics":["aspire","azure-api-management","contributions","dotnet","java","maven","spring","springboot"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aliencube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-05T06:49:39.000Z","updated_at":"2024-09-23T05:23:26.000Z","dependencies_parsed_at":"2024-06-16T09:49:46.178Z","dependency_job_id":"b68c79f8-1790-4c0f-979e-b26cf189d6e4","html_url":"https://github.com/aliencube/aspire-contribs","commit_stats":null,"previous_names":["aliencube/aspire-contribs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aliencube/aspire-contribs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Faspire-contribs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Faspire-contribs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Faspire-contribs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Faspire-contribs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aliencube","download_url":"https://codeload.github.com/aliencube/aspire-contribs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aliencube%2Faspire-contribs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270110285,"owners_count":24529029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspire","azure-api-management","contributions","dotnet","java","maven","spring","springboot"],"created_at":"2024-12-09T04:15:23.935Z","updated_at":"2025-10-13T04:11:39.239Z","avatar_url":"https://github.com/aliencube.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aspire Contribs\n\nThis is a collection of community contributed libraries for .NET Aspire\n\n## Prerequisites\n\n- [JDK 17+](https://learn.microsoft.com/java/openjdk/download)\n- [Springboot CLI](https://docs.spring.io/spring-boot/installing.html#getting-started.installing.cli)\n- [Apache Maven](https://maven.apache.org)\n- [Docker](https://docs.docker.com/get-docker/)\n\n## For Java App\n\n### Download OpenTelemetry agent\n\n1. First of all, you should have [OpenTelemetry Agent for Java](https://opentelemetry.io/docs/zero-code/java/agent/). You can download it to your local machine by running the following commands:\n\n    ```bash\n    # Bash\n    mkdir -p ./agents\n    wget -P ./agents \\\n        https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar\n    \n    # PowerShell\n    New-item -type Directory -Path ./downloaded -Force\n    Invoke-WebRequest `\n        -OutFile \"./agents/opentelemetry-javaagent.jar\" `\n        -Uri \"https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar\"\n    ```\n\n### Build container image\n\n1. Build the Spring app with Maven:\n\n    ```bash\n    pushd ./src/Aspire.Contribs.Spring.Maven\n\n    ./mvnw clean package\n\n    popd\n    ```\n\n1. Build a container image for the Spring app:\n\n    ```bash\n    pushd ./src/Aspire.Contribs.Spring.Maven\n\n    docker build . -t aspire-spring-maven-sample:latest\n\n    popd\n    ```\n\n1. Push the container image to [Docker Hub](https://hub.docker.com) under your organisation. This sample uses `aliencube`:\n\n    ```bash\n    docker tag aspire-spring-maven-sample:latest aliencube/aspire-spring-maven-sample:latest\n    docker push aliencube/aspire-spring-maven-sample:latest\n    ```\n\n   \u003e **NOTE**: You need to log in to Docker Hub before pushing the image.\n\n### Run .NET Aspire\n\n1. If you want to integrate the containerised Spring app built above, open `src/Aspire.Contribs.AppHost/Program.cs` and update the following line:\n\n    ```csharp\n    var containerapp = builder.AddSpringApp(\"containerapp\",\n                               new JavaAppContainerResourceOptions()\n                               {\n                                   // ⬇️⬇️⬇️ Update this line with your container image\n                                   ContainerImageName = \"aliencube/aspire-spring-maven-sample\",\n                                   // ⬆️⬆️⬆️ Update this line with your container image\n                                   OtelAgentPath = \"/agents\"\n                               });\n    ```\n\n1. Run .NET Aspire dashboard:\n\n    ```bash\n    dotnet watch run --project ./src/Aspire.Contribs.AppHost\n    ```\n\n1. Check the dashboard that both containerised app and executable app are up and running.\n\n    ![Aspire Dashboard](./images/dashboard.png)\n\n1. Open the web app in your browser and navigate to the `/weather` page and see the weather information from ASP.NET Core Web API app, Spring container app and Spring executable app.\n\n    ![Weather Page](./images/weather.png)\n\n## For Azure API Management\n\nTBD\n\n## Deployment to Azure\n\n1. Get the Azure environment name ready:\n\n    ```bash\n    # Bash\n    AZURE_ENV_NAME=\"contribs$((RANDOM%9000+1000))\"\n\n    # PowerShell\n    $AZURE_ENV_NAME=\"contribs$((Get-Random -Minimum 1000 -Maximum 9999))\"\n    ```\n\n1. Run the following command to deploy the app to Azure:\n\n    ```bash\n    azd up -e $AZURE_ENV_NAME\n    ```\n\n   Follow the instruction for the rest of the deployment process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Faspire-contribs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faliencube%2Faspire-contribs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faliencube%2Faspire-contribs/lists"}