{"id":22389734,"url":"https://github.com/entando/web-commons","last_synced_at":"2025-10-13T21:10:49.224Z","repository":{"id":44857175,"uuid":"180165704","full_name":"entando/web-commons","owner":"entando","description":"Utilities for services built on spring boot","archived":false,"fork":false,"pushed_at":"2022-01-21T23:28:38.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-26T21:33:41.602Z","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":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entando.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}},"created_at":"2019-04-08T14:22:28.000Z","updated_at":"2020-03-20T12:59:19.000Z","dependencies_parsed_at":"2022-08-27T22:30:47.671Z","dependency_job_id":null,"html_url":"https://github.com/entando/web-commons","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/entando/web-commons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entando%2Fweb-commons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entando%2Fweb-commons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entando%2Fweb-commons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entando%2Fweb-commons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entando","download_url":"https://codeload.github.com/entando/web-commons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entando%2Fweb-commons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017054,"owners_count":26085949,"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-10-13T02:00:06.723Z","response_time":61,"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-12-05T03:13:07.653Z","updated_at":"2025-10-13T21:10:49.210Z","avatar_url":"https://github.com/entando.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entando WEB Commons\n[![Build Status](https://jenkins.entandocloud.com/buildStatus/icon?job=de-web-commons-master)](https://jenkins.entandocloud.com/job/de-web-commons-master/)\nUtilities for services built on spring boot\n\n# Installation\nJust add the dependency on your `pom.xml` file\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.entando\u003c/groupId\u003e\n    \u003cartifactId\u003eweb-commons\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# Configuration\nAdd these configurations to your `application.properties` file\n\n### To enable Keycloak security\n```\nkeycloak.enabled=true\nkeycloak.auth-server-url=${KEYCLOAK_AUTH_URL:http://keycloak.url.here/auth}\nkeycloak.realm=${KEYCLOAK_REALM:realm-here}\nkeycloak.resource=${KEYCLOAK_CLIENT_ID:client-id}\nkeycloak.credentials.secret=${KEYCLOAK_CLIENT_SECRET}\nkeycloak.ssl-required=external\nkeycloak.public-client=false\n```\n\n### To enable swagger generation and `swagger-ui`\n```\nswagger.enabled=true\nswagger.info.title=${pom.name:Project Title Here}\nswagger.info.description=${pom.description:Put the default description here}\nswagger.info.version=${pom.version:Dev}\nswagger.info.contact.name=\nswagger.info.contact.email=\nswagger.info.license=\nswagger.info.licenseUrl=\nswagger.info.termsOfServiceUrl=\nswagger.info.basePackage=\n```\n\n\n### Exceptions\nThis project has some common exceptions to throw on your controllers and services.\nThere's no need to use ResponseEntity to control HTTP status unless you want to use Headers, etc.\n\n#### NotFoundException\nThrow this Exception to return 404.\n\n```\nthrow new NotFoundException(\"org.entando.someThingNotFound\");\n```\n\n#### HttpException\nThrow this Exception if you want to return another HTTP status code.\n\n```\nthrow new HttpException(HttpStatus.BAD_REQUEST, \"org.entando.badRequest\");\n```\n\n#### messages.properties\nThe message passed as argument to these exceptions are i18n in the `messages.properties` file.\n\n```\norg.entando.someThingNotFound=Something couldn't be found\norg.entando.badRequest=Request is invalid, something is missing\n```\n\nCommon codes\n```\norg.entando.error.validationError=Validation error\norg.entando.error.permissionDenied=Permission denied\norg.entando.error.unauthorized=Unauthorized\norg.entando.error.internalServerError=Internal server error\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentando%2Fweb-commons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentando%2Fweb-commons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentando%2Fweb-commons/lists"}