{"id":15896057,"url":"https://github.com/peacetrue/ra-data-spring-rest","last_synced_at":"2025-08-12T22:36:53.569Z","repository":{"id":51571902,"uuid":"248182709","full_name":"peacetrue/ra-data-spring-rest","owner":"peacetrue","description":"data provider for react-admin","archived":false,"fork":false,"pushed_at":"2023-02-14T00:40:31.000Z","size":373,"stargazers_count":56,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T13:57:13.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peacetrue.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2020-03-18T09:00:52.000Z","updated_at":"2025-06-18T07:59:35.000Z","dependencies_parsed_at":"2024-10-06T09:05:37.259Z","dependency_job_id":"f225cb63-10f9-4343-a6fd-44bdda6d6bd0","html_url":"https://github.com/peacetrue/ra-data-spring-rest","commit_stats":{"total_commits":7,"total_committers":4,"mean_commits":1.75,"dds":0.5714285714285714,"last_synced_commit":"6737278fbdb5725ea65ac59ca1972fde110797f8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peacetrue/ra-data-spring-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peacetrue%2Fra-data-spring-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peacetrue%2Fra-data-spring-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peacetrue%2Fra-data-spring-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peacetrue%2Fra-data-spring-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peacetrue","download_url":"https://codeload.github.com/peacetrue/ra-data-spring-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peacetrue%2Fra-data-spring-rest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269780571,"owners_count":24474679,"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-10T02:00:08.965Z","response_time":71,"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":[],"created_at":"2024-10-06T09:05:33.350Z","updated_at":"2025-08-12T22:36:52.943Z","avatar_url":"https://github.com/peacetrue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"= ra-data-spring-rest\nxiayx \u003cxiayouxue@hotmail.com\u003e\nv1.0, 2020-03-18: SNAPSHOT\n\nA https://github.com/marmelab/react-admin[React-admin] data provider for backends built with Spring Framework.\n\n== Installation\n\n``npm install --save ra-data-spring-rest``\n\n== Usage\n\n[source%nowrap,javascript]\n----\n// in App.js\nimport React from 'react';\nimport { Admin, Resource } from 'react-admin';\nimport {springDataProvider, springHttpClient} from 'ra-data-spring-rest';\nimport { UserList } from './users';\n\nconst httpClient = springHttpClient();\nconst dataProvider = springDataProvider('http://path.to.api/',httpClient);\nconst App = () =\u003e (\n    \u003cAdmin dataProvider={dataProvider}\u003e\n        \u003cResource name=\"users\" list={UserList} /\u003e\n    \u003c/Admin\u003e\n);\n\nexport default App;\n----\n\n`springHttpClient()` use ``fetch`` to send request, +\nyou can also use ``springHttpClient(fetchUtils.fetchJson)``, +\nor customize it：\n\n[source%nowrap,javascript]\n----\nlet httpClient = springHttpClient((url, options = {}) =\u003e {\n    options.credentials = 'include';\n    return fetchUtils.fetchJson(url, options)\n        .then(response =\u003e {\n            // do some thing you want\n            return response;\n        });\n});\n----\n\n== Feature\n\nThis package was built to work with the default configurations of a web app using Spring Framework.\nIt currently supports:\n\n* Spring URLs with path variable.\n* Sorting with ``SortHandlerMethodArgumentResolver``, using the sort query string parameter.\n* Pagination with ``PageableHandlerMethodArgumentResolver``, using the page and size query string parameters.\n\nthe react-admin Data Provider request example:\n\n* GET_LIST             =\u003e GET http://my.api.url/posts?keyword=\u0026page=0\u0026size=10\u0026sort=id,asc\n* GET_ONE              =\u003e GET http://my.api.url/posts/123\n* GET_MANY             =\u003e GET http://my.api.url/posts?id=1234\u0026id=5678\n* GET_MANY_REFERENCE   =\u003e GET http://my.api.url/comments?postId=\u0026page=0\u0026size=10\u0026sort=id,asc\n* CREATE               =\u003e POST http://my.api.url/posts\n* UPDATE               =\u003e PUT http://my.api.url/posts/123\n* UPDATE_MANY          =\u003e multiple call UPDATE\n* DELETE               =\u003e DELETE http://my.api.url/posts/123\n* DELETE_MANY          =\u003e multiple call DELETE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeacetrue%2Fra-data-spring-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeacetrue%2Fra-data-spring-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeacetrue%2Fra-data-spring-rest/lists"}