{"id":21076333,"url":"https://github.com/rapter1990/springbootsecurity","last_synced_at":"2025-05-16T06:32:13.053Z","repository":{"id":228171830,"uuid":"773329191","full_name":"Rapter1990/springbootsecurity","owner":"Rapter1990","description":"Spring Boot Security Example (Spring Boot, Java 17, Spring Security, Docker, Maven, JUnit Test, Integration Test, Test Container, MySql)","archived":false,"fork":false,"pushed_at":"2024-04-03T19:24:10.000Z","size":6429,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T04:11:59.005Z","etag":null,"topics":["authentication","authorization","docker","docker-compose","dockerfile","intergration-test","java","java17","junit","jwt","lombok","maven","mockito","monolith","mysql","spring-boot","spring-security","test-container"],"latest_commit_sha":null,"homepage":"","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/Rapter1990.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-17T11:27:49.000Z","updated_at":"2024-04-21T08:54:19.000Z","dependencies_parsed_at":"2024-03-17T12:33:29.646Z","dependency_job_id":"eba6b313-9707-401c-b132-e64f854bdd94","html_url":"https://github.com/Rapter1990/springbootsecurity","commit_stats":null,"previous_names":["rapter1990/springbootsecurity"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fspringbootsecurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fspringbootsecurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fspringbootsecurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapter1990%2Fspringbootsecurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rapter1990","download_url":"https://codeload.github.com/Rapter1990/springbootsecurity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225413214,"owners_count":17470535,"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":["authentication","authorization","docker","docker-compose","dockerfile","intergration-test","java","java17","junit","jwt","lombok","maven","mockito","monolith","mysql","spring-boot","spring-security","test-container"],"created_at":"2024-11-19T19:27:52.691Z","updated_at":"2024-11-19T19:27:53.631Z","avatar_url":"https://github.com/Rapter1990.png","language":"Java","readme":"# Spring Boot with Spring Security through JWT Implementation\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"screenshots/spring_boot_security_example_jwt_implementation.png\" alt=\"Main Information\" width=\"700\" height=\"500\"\u003e\n\u003c/p\u003e\n\n### 📖 Information\n\n\u003cul style=\"list-style-type:disc\"\u003e\n  \u003cli\u003e\u003cb\u003eIt\u003c/b\u003e is a kind of Spring Boot example with covering important and useful features\u003c/li\u003e \n  \u003cli\u003eHere is the explanation of the example\n       \u003cul\u003e\u003cb\u003eAdmin\u003c/b\u003e and \u003cb\u003eUser\u003c/b\u003e implement their own \u003cb\u003eauthentication\u003c/b\u003e and \u003cb\u003eauthorization\u003c/b\u003e through their defined \u003cb\u003erole\u003c/b\u003e name\u003c/ul\u003e\n       \u003cul\u003e\u003cb\u003eAdmin\u003c/b\u003e handles with creating product, getting all products, getting product by Id, updating product by Id and lastly deleting product by Id\u003c/ul\u003e\n       \u003cul\u003e\u003cb\u003eAdmin\u003c/b\u003e only handles with getting all products and getting product by Id\u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\n### Explore Rest APIs\n\n\u003ctable style=\"width:100%\"\u003e\n  \u003ctr\u003e\n      \u003cth\u003eMethod\u003c/th\u003e\n      \u003cth\u003eUrl\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eRequest Body\u003c/th\u003e\n      \u003cth\u003eHeader\u003c/th\u003e\n      \u003cth\u003eValid Path Variable\u003c/th\u003e\n      \u003cth\u003eNo Path Variable\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/admin/register\u003c/td\u003e\n      \u003ctd\u003eAdmin Register\u003c/td\u003e\n      \u003ctd\u003eAdminRegisterRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/admin/login\u003c/td\u003e\n      \u003ctd\u003eAdmin Login\u003c/td\u003e\n      \u003ctd\u003eLoginRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/admin/refreshtoken\u003c/td\u003e\n      \u003ctd\u003eAdmin Refresh Token\u003c/td\u003e\n      \u003ctd\u003eTokenRefreshRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/admin/logout\u003c/td\u003e\n      \u003ctd\u003eAdmin Logout\u003c/td\u003e\n      \u003ctd\u003eTokenInvalidateRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/user/register\u003c/td\u003e\n      \u003ctd\u003eUser Register\u003c/td\u003e\n      \u003ctd\u003eUserRegisterRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/user/login\u003c/td\u003e\n      \u003ctd\u003eUser Login\u003c/td\u003e\n      \u003ctd\u003eLoginRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/user/refreshtoken\u003c/td\u003e\n      \u003ctd\u003eUser Refresh Token\u003c/td\u003e\n      \u003ctd\u003eTokenRefreshRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/authentication/user/logout\u003c/td\u003e\n      \u003ctd\u003eUser Logout\u003c/td\u003e\n      \u003ctd\u003eTokenInvalidateRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePOST\u003c/td\u003e\n      \u003ctd\u003e/api/v1/products\u003c/td\u003e\n      \u003ctd\u003eCreate Product\u003c/td\u003e\n      \u003ctd\u003eProductCreateRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/api/v1/products/{productId}\u003c/td\u003e\n      \u003ctd\u003eGet Product By Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eProductId\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eGET\u003c/td\u003e\n      \u003ctd\u003e/api/v1/products\u003c/td\u003e\n      \u003ctd\u003eGet Products\u003c/td\u003e\n      \u003ctd\u003eProductPagingRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003ePUT\u003c/td\u003e\n      \u003ctd\u003e/api/v1/products/{productId}\u003c/td\u003e\n      \u003ctd\u003eUpdate Product By Id\u003c/td\u003e\n      \u003ctd\u003eProductUpdateRequest\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eProductId\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n  \u003ctr\u003e\n      \u003ctd\u003eDELETE\u003c/td\u003e\n      \u003ctd\u003e/api/v1/products/{productId}\u003c/td\u003e\n      \u003ctd\u003eDelete Product By Id\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n      \u003ctd\u003eProductId\u003c/td\u003e\n      \u003ctd\u003e\u003c/td\u003e\n  \u003ctr\u003e\n\u003c/table\u003e\n\n\n### Technologies\n\n---\n- Java 17\n- Spring Boot 3.0\n- Restful API\n- Lombok\n- Maven\n- Junit5\n- Mockito\n- Integration Tests\n- Docker\n- Docker Compose\n\n\n### Prerequisites\n\n#### Define Variable in .env file\n\n```\nDATABASE_USERNAME={DATABASE_USERNAME}\nDATABASE_PASSWORD={DATABASE_PASSWORD}\n```\n\n---\n- Maven or Docker\n---\n\n\n### Docker Run\nThe application can be built and run by the `Docker` engine. The `Dockerfile` has multistage build, so you do not need to build and run separately.\n\nPlease follow directions shown below in order to build and run the application with Docker Compose file;\n\n```sh\n$ cd springbootsecurity\n$ docker-compose up -d\n```\n\nIf you change anything in the project and run it on Docker, you can also use this command shown below\n\n```sh\n$ cd springbootsecurity\n$ docker-compose up --build\n```\n\n---\n### Maven Run\nTo build and run the application with `Maven`, please follow the directions shown below;\n\n```sh\n$ cd springbootsecurity\n$ mvn clean install\n$ mvn spring-boot:run\n```\n\n### Screenshots\n\n\u003cdetails\u003e\n\u003csummary\u003eClick here to show the screenshots of project\u003c/summary\u003e\n    \u003cp\u003e Figure 1 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_1.PNG\"\u003e\n    \u003cp\u003e Figure 2 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_2.PNG\"\u003e\n    \u003cp\u003e Figure 3 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_3.PNG\"\u003e\n    \u003cp\u003e Figure 4 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_4.PNG\"\u003e\n    \u003cp\u003e Figure 5 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_5.PNG\"\u003e\n    \u003cp\u003e Figure 6 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_6.PNG\"\u003e\n    \u003cp\u003e Figure 7 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_7.PNG\"\u003e\n    \u003cp\u003e Figure 8 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_8.PNG\"\u003e\n    \u003cp\u003e Figure 9 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_9.PNG\"\u003e\n    \u003cp\u003e Figure 10 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_10.PNG\"\u003e\n    \u003cp\u003e Figure 11 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_11.PNG\"\u003e\n    \u003cp\u003e Figure 12 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_12.PNG\"\u003e\n    \u003cp\u003e Figure 13 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_13.PNG\"\u003e\n    \u003cp\u003e Figure 14 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_14.PNG\"\u003e\n    \u003cp\u003e Figure 15 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_15.PNG\"\u003e\n    \u003cp\u003e Figure 16 \u003c/p\u003e\n    \u003cimg src =\"screenshots/spring_16.PNG\"\u003e\n\u003c/details\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fspringbootsecurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapter1990%2Fspringbootsecurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapter1990%2Fspringbootsecurity/lists"}