{"id":16032520,"url":"https://github.com/actionless/spring_boot_webapi_example","last_synced_at":"2026-04-20T18:32:44.855Z","repository":{"id":228351159,"uuid":"773739539","full_name":"actionless/spring_boot_webapi_example","owner":"actionless","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-18T10:23:05.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-12T20:17:01.754Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actionless.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-03-18T10:08:07.000Z","updated_at":"2024-03-18T10:08:39.000Z","dependencies_parsed_at":"2024-03-18T11:37:16.425Z","dependency_job_id":"9389fa5d-e28e-4b5f-ae8d-818428625a6c","html_url":"https://github.com/actionless/spring_boot_webapi_example","commit_stats":null,"previous_names":["actionless/spring_boot_webapi_example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/actionless/spring_boot_webapi_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionless%2Fspring_boot_webapi_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionless%2Fspring_boot_webapi_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionless%2Fspring_boot_webapi_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionless%2Fspring_boot_webapi_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actionless","download_url":"https://codeload.github.com/actionless/spring_boot_webapi_example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionless%2Fspring_boot_webapi_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-08T21:22:58.363Z","updated_at":"2026-04-20T18:32:44.830Z","avatar_url":"https://github.com/actionless.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Java Test task\n==\n\n\n\nInstallation\n==\n\n```console\n$ ./gradlew\n```\n\n\n\nRunning\n==\n\n```console\n$ ./gradlew bootRun\n```\n\nApplication would listen on `http://localhost:8080/`.\n\n\n\nAutomatic Testing\n==\n```console\n$ ./gradlew test\n```\n\n\n\nManual Testing\n==\n\n\nCreate Customers\n===\n\n```console\n$ curl --request POST \\\n        --url http://localhost:8080/api/customer \\\n        --header 'content-type: application/json' \\\n        --data '{\"name\":\"Alice\", \"surname\": \"Bright\"}'\n\n{\"id\":0,\"name\":\"Alice\",\"surname\":\"Bright\"}\n\n$ curl --request POST \\\n        --url http://localhost:8080/api/customer \\\n        --header 'content-type: application/json' \\\n        --data '{\"name\":\"Bob\", \"surname\": \"Chunk\"}'\n\n{\"id\":1,\"name\":\"Bob\",\"surname\":\"Chunk\"}\n\n$ curl --request POST \\\n        --url http://localhost:8080/api/customer \\\n        --header 'content-type: application/json' \\\n        --data '{\"name\":\"Charlie\", \"surname\": \"Drop\"}'\n\n{\"id\":2,\"name\":\"Charlie\",\"surname\":\"Drop\"}\n```\n\n```console\n$ curl --request GET \\\n        --url http://localhost:8080/api/customers \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n[\n  {\n    \"id\": 0,\n    \"name\": \"Alice\",\n    \"surname\": \"Bright\"\n  },\n  {\n    \"id\": 1,\n    \"name\": \"Bob\",\n    \"surname\": \"Chunk\"\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Charlie\",\n    \"surname\": \"Drop\"\n  }\n]\n\n$ curl --request GET \\\n        --url http://localhost:8080/api/customer/0 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 0,\n  \"name\": \"Alice\",\n  \"surname\": \"Bright\"\n}\n```\n\n\nCreate \"Current Accounts\" for the Customers\n===\n\n```console\n$ curl --request POST \\\n        --url http://localhost:8080/api/account \\\n        --header 'content-type: application/json' \\\n        --data '{\"customerID\": 0, \"initialCredit\": 3}'\n{\"id\":0,\"customer\":{\"id\":0,\"name\":\"Alice\",\"surname\":\"Bright\"},\"balance\":3}\n\n$ curl --request POST \\\n        --url http://localhost:8080/api/account \\\n        --header 'content-type: application/json' \\\n        --data '{\"customerID\": 1, \"initialCredit\": 0}'\n{\"id\":1,\"customer\":{\"id\":1,\"name\":\"Bob\",\"surname\":\"Chunk\"},\"balance\":0}\n\n$ curl --request POST \\\n        --url http://localhost:8080/api/account \\\n        --header 'content-type: application/json' \\\n        --data '{\"customerID\": 2, \"initialCredit\": -1}'\n{\"id\":2,\"customer\":{\"id\":2,\"name\":\"Charlie\",\"surname\":\"Drop\"},\"balance\":-1}\n\n$ curl --request POST \\\n        --url http://localhost:8080/api/account \\\n        --header 'content-type: application/json' \\\n        --data '{\"customerID\": 2, \"initialCredit\": 4}'\n{\"id\":3,\"customer\":{\"id\":2,\"name\":\"Charlie\",\"surname\":\"Drop\"},\"balance\":4}\n```\n\n```console\n$ curl --request GET \\\n        --url http://localhost:8080/api/accounts \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n[\n  {\n    \"id\": 0,\n    \"customer\": {\n      \"id\": 0,\n      \"name\": \"Alice\",\n      \"surname\": \"Bright\"\n    },\n    \"balance\": 3\n  },\n  {\n    \"id\": 1,\n    \"customer\": {\n      \"id\": 1,\n      \"name\": \"Bob\",\n      \"surname\": \"Chunk\"\n    },\n    \"balance\": 0\n  },\n  {\n    \"id\": 2,\n    \"customer\": {\n      \"id\": 2,\n      \"name\": \"Charlie\",\n      \"surname\": \"Drop\"\n    },\n    \"balance\": -1\n  },\n  {\n    \"id\": 3,\n    \"customer\": {\n      \"id\": 2,\n      \"name\": \"Charlie\",\n      \"surname\": \"Drop\"\n    },\n    \"balance\": 4\n  }\n]\n```\n\n```console\n$ curl --request GET \\\n        --url http://localhost:8080/api/account/0 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 0,\n  \"customer\": {\n    \"id\": 0,\n    \"name\": \"Alice\",\n    \"surname\": \"Bright\"\n  },\n  \"balance\": 3,\n  \"transactions\": [\n    {\n      \"id\": 0,\n      \"amount\": 3\n    }\n  ]\n}\n\n$ curl --request GET \\\n        --url http://localhost:8080/api/account/1 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 1,\n  \"customer\": {\n    \"id\": 1,\n    \"name\": \"Bob\",\n    \"surname\": \"Chunk\"\n  },\n  \"balance\": 0,\n  \"transactions\": []\n}\n\n$ curl --request GET \\\n        --url http://localhost:8080/api/account/2 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 2,\n  \"customer\": {\n    \"id\": 2,\n    \"name\": \"Charlie\",\n    \"surname\": \"Drop\"\n  },\n  \"balance\": -1,\n  \"transactions\": [\n    {\n      \"id\": 1,\n      \"amount\": -1\n    }\n  ]\n}\n\n$ curl --request GET \\\n        --url http://localhost:8080/api/account/3 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 3,\n  \"customer\": {\n    \"id\": 2,\n    \"name\": \"Charlie\",\n    \"surname\": \"Drop\"\n  },\n  \"balance\": 4,\n  \"transactions\": [\n    {\n      \"id\": 2,\n      \"amount\": 4\n    }\n  ]\n}\n```\n\nCreate Transaction towards \"Current Account\"\n===\n\n```console\n$ curl --request POST \\\n        --url http://localhost:8080/api/transaction \\\n        --header 'content-type: application/json' \\\n        --data '{\"accountID\": 3, \"amount\": 3}'\n{\"id\":3,\"account\":{\"id\":3,\"customer\":{\"id\":2,\"name\":\"Charlie\",\"surname\":\"Drop\"},\"balance\":7},\"amount\":3}\n\n$ curl --request GET \\\n        --url http://localhost:8080/api/account/3 \\\n        --header 'content-type: application/json' \\\n      2\u003e/dev/null | jq\n{\n  \"id\": 3,\n  \"customer\": {\n    \"id\": 2,\n    \"name\": \"Charlie\",\n    \"surname\": \"Drop\"\n  },\n  \"balance\": 7,\n  \"transactions\": [\n    {\n      \"id\": 2,\n      \"amount\": 4\n    },\n    {\n      \"id\": 3,\n      \"amount\": 3\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionless%2Fspring_boot_webapi_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factionless%2Fspring_boot_webapi_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionless%2Fspring_boot_webapi_example/lists"}