{"id":23120550,"url":"https://github.com/tupizz/xy-inc","last_synced_at":"2026-05-17T06:35:23.308Z","repository":{"id":100374415,"uuid":"177070643","full_name":"tupizz/xy-inc","owner":"tupizz","description":"spring boot rest api playgroung","archived":false,"fork":false,"pushed_at":"2019-03-26T01:15:57.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-04T03:15:40.783Z","etag":null,"topics":["java","rest-api","spring-boot","swagger","swagger-ui"],"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/tupizz.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,"publiccode":null,"codemeta":null}},"created_at":"2019-03-22T04:21:11.000Z","updated_at":"2019-03-26T01:15:58.000Z","dependencies_parsed_at":"2023-03-07T21:00:36.726Z","dependency_job_id":null,"html_url":"https://github.com/tupizz/xy-inc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tupizz/xy-inc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tupizz%2Fxy-inc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tupizz%2Fxy-inc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tupizz%2Fxy-inc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tupizz%2Fxy-inc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tupizz","download_url":"https://codeload.github.com/tupizz/xy-inc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tupizz%2Fxy-inc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065416,"owners_count":24520945,"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":["java","rest-api","spring-boot","swagger","swagger-ui"],"created_at":"2024-12-17T06:11:32.171Z","updated_at":"2025-10-19T06:01:31.602Z","avatar_url":"https://github.com/tupizz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"DOCUMENTAÇÃO DO PROJETO\n===========================================\n\n\n## **ESTRUTURA DO BANCO**\n \nForam criados dois bancos local sendo um para a aplicação e outro para rodar os testes de integração/endpoints, com as seguintes URIs de conexão. Além disso, foi disponibilizado no arquivo `application.properties` uma url de conexão em um banco de dados as service online postgresql, caso não desejam criar uma database `xy-inc` local na porta 5433 (ou de sua preferência).  \n\n**Banco principal:** `jdbc:postgresql://localhost:5433/xy-inc`\n\n**Banco de teste:** `jdbc:h2:mem:test`\n\n**Posgresql as Service:** `jdbc:postgresql://ec2-184-73-153-64.compute-1.amazonaws.com:5432/dc6j2oppjdv26m`\n\nAssim, a seguinte modelagem da entidade foi projetada:\n\n    name: String required,\n    x: Integer required,\n    y: Integer required,\n\n\u003cbr/\u003e\n\n## **DESCRIÇÃO DA API**\n\nA porta 8080 está exposta, e a partir dela é possível acessar a API de resources:\n\n- **GET**\n    - **Listagem:** Para consultar todos os recursos cadastrados no banco, basta acessar http://localhost:8080/poi \n    \n    - **Encontrar POI's proximos:** A partir de http://localhost:8008/poi/near é possível listar todos os pois proximos a um determinado ponto levando em consideração uma thresold de distância, para isso envie como parâmetro na url os seguintes dados: x, y e d (distância máxima desejada para filtragem). \n\n    Por exemplo: `http://localhost:8008/poi/near?x=20\u0026y=10\u0026d=10`\n\n    Resposta:\n\n    ```json\n        [\n            {\n                \"id\": 1,\n                \"x\": 27,\n                \"y\": 12,\n                \"name\": \"Lanchonete\"\n            },\n            {\n                \"id\": 3,\n                \"x\": 15,\n                \"y\": 12,\n                \"name\": \"Joalheria\"\n            },\n            {\n                \"id\": 5,\n                \"x\": 23,\n                \"y\": 6,\n                \"name\": \"Supermercado\"\n            },\n            {\n                \"id\": 6,\n                \"x\": 12,\n                \"y\": 8,\n                \"name\": \"Pub\"\n            }\n        ]\n    ```\n\n- **POST**\n    - **Criação de novo POI:** A partir de http://localhost:8080/poi é possível criar um novo POI, como payload debe ser enviado um objeto JSON, como no exemplo:\n            \n    ```json\n        {\n            \"x\": 22,\n            \"y\": 17,\n            \"name\": \"Estádio de futebol\"\n        }\n    ```\n\n## EXECUTANDO O PROJETO \n\nThis application is packaged as a war which has Tomcat 8 embedded. No Tomcat or JBoss installation is necessary. You run it using the ```java -jar``` command.\n\n* Make sure you are using JDK 1.8 and Maven 3.x (importante)\n* You can build the project and run the tests by running ```mvn clean package```\n* Once successfully built, you can run the service by one of these two methods:\n```\n        java -jar -Dspring.profiles.active=test target/spring-boot-rest-example-0.5.0.war\nor\n        mvn spring-boot:run -Drun.arguments=\"spring.profiles.active=test\"\n```\n\n----\n\n\n### To view Swagger 2 API docs\n\nRun the server and browse to localhost:8080/swagger-ui.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftupizz%2Fxy-inc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftupizz%2Fxy-inc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftupizz%2Fxy-inc/lists"}