{"id":49412454,"url":"https://github.com/jeduardo/springboot-demo-app","last_synced_at":"2026-04-29T01:10:55.537Z","repository":{"id":38355519,"uuid":"102982917","full_name":"jeduardo/springboot-demo-app","owner":"jeduardo","description":"Small Spring Boot app working with database access, JSON APIs and logging","archived":false,"fork":false,"pushed_at":"2025-09-30T06:26:37.000Z","size":72,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T08:31:18.026Z","etag":null,"topics":["demo","java","spring","webapp"],"latest_commit_sha":null,"homepage":"","language":"Java","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/jeduardo.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-09-09T20:24:19.000Z","updated_at":"2025-09-30T06:26:34.000Z","dependencies_parsed_at":"2025-08-13T21:15:50.449Z","dependency_job_id":null,"html_url":"https://github.com/jeduardo/springboot-demo-app","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jeduardo/springboot-demo-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeduardo%2Fspringboot-demo-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeduardo%2Fspringboot-demo-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeduardo%2Fspringboot-demo-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeduardo%2Fspringboot-demo-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeduardo","download_url":"https://codeload.github.com/jeduardo/springboot-demo-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeduardo%2Fspringboot-demo-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32406011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["demo","java","spring","webapp"],"created_at":"2026-04-29T01:10:54.908Z","updated_at":"2026-04-29T01:10:55.522Z","avatar_url":"https://github.com/jeduardo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Springboot demo app\n\n[![Tests](https://github.com/jeduardo/springboot-demo-app/actions/workflows/test.yml/badge.svg)](https://github.com/jeduardo/springboot-demo-app/actions/workflows/test.yml)\n\nThis is a small demo app created in Spring boot created to exercise automated deployments\nof non-trivial applications. It is a Java version of the [flask-demo-app](https://github.com/jeduardo/flask-demo-app).\n\n- Configuration based on environment variables\n- Database-backed entries\n- JSON API\n- Stateless\n- Support for X-Request-ID header for request tracking\n- Logging with JSON to stdout\n\n## Model\n\nThe only model defined for the application is the model of an `Entry`.\n\nAn `Entry` is composed by the following fields:\n\n- id: unique identifier for an entry. This field is generated automatically\n  and cannot be modified.\n- description: a description for the `Entry`.\n- comment: a comment over the `Entry`.\n\n## Configuration\n\nThe following environment variables can be configured:\n\n- APP_DATABASE_URL (mandatory): points to the backing database\n\n- APP_DATABASE_USER (mandatory): holds the database user\n\n- APP_DATABASE_PASSWORD (mandatory): holds the database password\n\n- APP_DATABASE_SCHEMA (mandatory): specify what the persistence layer should do with the schema during the boot according to the options:\n\n  - none: nothing is done\n  - validate: schema is validated during initialization time\n  - create: schema is reset during initialization time\n  - update: schema is updated during initialization time\n\n- APP_LOG_LEVEL (optional): allows configuring the application log level. If it is\n  not specified, the default log level will be INFO.\n\n- APP_FLYWAY_ENABLED (optional): whether Flyway-based migrations should be executed during boot. If left out, it will be enabled by default.\n\n_Note: If no database configuration is specified, the application will start on a single-shot execution mode using a memory-backed database that will be erased when it is stopped._\n\n## Database migration\n\nBefore running the application, the database must be setup. There are built-in migration\nscripts with Flyway to accomplish this. In order to run this, the following maven command\nmust be executed:\n\n```ShellSession\n$ export APP_DATABASE_USER=pxdtwhsbazfwdr\n$ export APP_DATABASE_PASSWORD=fc06ba6b5f75e0c1ab303eb26a1332315ee53c0314b9ff34dcbbe7cc0b21005f\n$ export APP_DATABASE_URL='jdbc:postgresql://ec2-54-247-189-64.eu-west-1.compute.amazonaws.com:5432/da8s86ph6ufuq7?ssl=true\u0026sslfactory=org.postgresql.ssl.NonValidatingFactory'\n$ mvn flyway:migrate\n```\n\n## Deployment\n\nAll requirements for the application are specified in the `pom.xml` file.\n\nThe application is build with the command `mvn package`. The result will be an executable JAR under target/entries-X.X.X.jar, where X.X.X is the version number.\n\nTo execute the application, define all the required configuration variables and run the application with `java -jar target/entries-X.X.X.jar`, as below:\n\n```ShellSession\n$ export APP_DATABASE_USER=pxdtwhsbazfwdr\n$ export APP_DATABASE_PASSWORD=fc06ba6b5f75e0c1ab303eb26a1332315ee53c0314b9ff34dcbbe7cc0b21005f\n$ export APP_DATABASE_URL='jdbc:postgresql://ec2-54-247-189-64.eu-west-1.compute.amazonaws.com:5432/da8s86ph6ufuq7?ssl=true\u0026sslfactory=org.postgresql.ssl.NonValidatingFactory'\n$ java -jar target/entries-X.X.X.jar\n```\n\nOn the first execution, create the schema by also exporting `APP_DATABASE_SCHEMA=create`.\n\n## API\n\nThe following endpoints are offered:\n\n- /api/v1/entries\n\n  - parameters: none\n  - methods: GET\n  - description: list all entries in the database\n  - accepts: all formats\n  - returns: application/json\n\n- /api/v1/entries\n\n  - parameters: JSON object representing an `Entry`\n  - methods: POST\n  - description: create a new entry\n  - accepts: application/json\n  - returns: application/json\n\n- /api/v1/entries/\u003cid\u003e\n\n  - parameters: JSON object representing an `Entry`\n  - methods: POST\n  - description: update an existing `Entry`\n  - accepts: application/json\n  - returns: application/json\n\n- /api/v1/entries/\u003cid\u003e\n\n  - parameters: entry id\n  - methods: DELETE\n  - description: remove an entry from the database\n  - accepts: all formats\n  - returns: application/json\n\n- /actuator/health\n\n  - parameters: none\n  - methods: GET\n  - description: return \"Status: UP\" if the application is reachable\n  - accepts: all formats\n  - returns: application/json\n\n- /actuator/prometheus\n  - parameters: none\n  - methods: GET\n  - description: return metrics for Prometheus to scrape\n  - accepts: all formats\n  - returns: text/plain\n\n# License\n\nThis code is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeduardo%2Fspringboot-demo-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeduardo%2Fspringboot-demo-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeduardo%2Fspringboot-demo-app/lists"}