{"id":21920609,"url":"https://github.com/brendan-rius/spring-rest-cors-template","last_synced_at":"2025-03-22T10:28:15.139Z","repository":{"id":11735746,"uuid":"14261747","full_name":"brendan-rius/spring-rest-cors-template","owner":"brendan-rius","description":"[DEPRECATED] Spring based boilerplate code for RESTful services implementing CORS.","archived":false,"fork":false,"pushed_at":"2013-11-09T18:41:02.000Z","size":144,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T10:12:05.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/brendan-rius.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}},"created_at":"2013-11-09T17:41:49.000Z","updated_at":"2017-01-23T02:50:14.000Z","dependencies_parsed_at":"2022-09-09T08:52:12.568Z","dependency_job_id":null,"html_url":"https://github.com/brendan-rius/spring-rest-cors-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendan-rius%2Fspring-rest-cors-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendan-rius%2Fspring-rest-cors-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendan-rius%2Fspring-rest-cors-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brendan-rius%2Fspring-rest-cors-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brendan-rius","download_url":"https://codeload.github.com/brendan-rius/spring-rest-cors-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244942079,"owners_count":20535923,"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","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-11-28T20:15:22.752Z","updated_at":"2025-03-22T10:28:15.112Z","avatar_url":"https://github.com/brendan-rius.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Boilerplate code for creating flexible and clean RESTful services using Spring 3.\nThis project uses a java-based config and a JPA connection to a MySQL DB.\nThis project is also CORS aware and can be used easily with JQuery from another domain than the dataserver without any modifications.\nDon't hesitate to fork and star the project if you like it.\n\nThe POM is inherited from another project that I don't remember, but has changed since from.\n\n## What you have to do to run this code\n  * Change Application.class to connect your DB\n  * Run Application.main() (Spring boot so no servlet container needed)\n\n## How does it work\n  If you have ever developed using Spring you should understand all the code that is quite simple,\n  buf if you're not experienced, reading this section could be time-saving.\n  Here's the main points on how it work:\n  \n  * Controllers should define the URLs and maybe get specific parameters (custom HTTP headers ...).\n    Then it uses services (that are passed to the controller using dependency injection) to perform what it has to.\n    The @ReponseBody annotation tells that the response has to be JSON encoded (using Jackson). The responses should\n    return a header (see controller example) to allow CORS to work fine.\n  \n  * Services receive all the paramaters from controllers and treat them (DB access using Repositories, calculation, etc)\n    Services should precise if they use the DB with @Transactionnal annotation.\n  \n  * Repositories are interfaces whose source code is generated via Hibernate.\n  \n  * Models are POJOs and are marked with annotations to configure their comportment with the DB.\n  \n  * webapp is the directory where you can add your static content\n  \n  * application.properties defines the properties of the application such as the port used (8080 by default)\n\n## More infos\n  * CORS: http://zhentao-li.blogspot.fr/2013/06/example-for-enabling-cors-support-in.html\n  * Spring boot: http://spring.io/blog/2013/08/06/spring-boot-simplifying-spring-for-everyone\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendan-rius%2Fspring-rest-cors-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrendan-rius%2Fspring-rest-cors-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrendan-rius%2Fspring-rest-cors-template/lists"}