{"id":18781164,"url":"https://github.com/trucka312/java_springboot_jwt","last_synced_at":"2025-12-19T06:30:17.549Z","repository":{"id":179714612,"uuid":"654636047","full_name":"trucka312/Java_springboot_JWT","owner":"trucka312","description":"Yêu cầu định danh, xử lí đăng nhập thư viện JWT","archived":false,"fork":false,"pushed_at":"2023-06-16T15:23:35.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-29T11:14:14.322Z","etag":null,"topics":["java-8","javaspringboot","jwt-authentication","jwt-token"],"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/trucka312.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":"2023-06-16T15:09:36.000Z","updated_at":"2023-07-31T15:02:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5965836a-eb40-4985-bc0f-bcda2d959c4b","html_url":"https://github.com/trucka312/Java_springboot_JWT","commit_stats":null,"previous_names":["trucka312/java_springboot_jwt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trucka312%2FJava_springboot_JWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trucka312%2FJava_springboot_JWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trucka312%2FJava_springboot_JWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trucka312%2FJava_springboot_JWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trucka312","download_url":"https://codeload.github.com/trucka312/Java_springboot_JWT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699019,"owners_count":19682535,"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":["java-8","javaspringboot","jwt-authentication","jwt-token"],"created_at":"2024-11-07T20:29:47.623Z","updated_at":"2025-12-19T06:30:17.477Z","avatar_url":"https://github.com/trucka312.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting Started\n\n## Development\n### Config JAVA_HOME\nAdd JAVA_HOME in system environment. \nRun `echo %JAVA_HOME%` to check value\n(Project use JDK 17)\n\nTo start your application in the development profile, simply run:\n\n    \u003e mvnw\n* [http://localhost:8085](http://localhost:8085)\n\nPort default config in file [application.yaml]\n\n    server.port: 8085\nOr start with production profile, run:\n\n    \u003e mvnw -Pprod\n\nCtrl + C to stop\n### Password encrypt\nPassword in table encrypted by `new BCryptPasswordEncoder().encode(password)`\n\n    Ex: new BCryptPasswordEncoder().encode(\"admin\")\n    Output: $2a$10$r.XIN4K9vTioiuYQwaTop.UVQ5r5FvrKk2V5Orm9Hc6n4i9Tvjthy\n\n## Login with API\n    http://localhost:8085/login\n\nExample running on Windows command environment:\n\n    curl -d \"{\\\"username\\\": \\\"admin\\\", \\\"password\\\": \\\"admin\\\"}\" ^\n        -H \"Content-Type: application/json\" ^\n        -X POST http://localhost:8085/login\n\nRunning on Linux or Git bash command:\n\n    curl -d \"{\\\"username\\\": \\\"admin\\\", \\\"password\\\": \\\"admin\\\"}\" \\\n        -H \"Content-Type: application/json\" \\\n        -X POST http://localhost:8085/login\n\nYou can use \"Postman\" to run the test: `https://www.postman.com`\n\n## Call other API\n`Set Authorization: Bearer \u003ctoken\u003e` when calling request api\n\n    Ex:\n    curl -H \"Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImlzcyI6InNlbGYiLCJleHAiOjE2NzcwMTI0MTgsImlhdCI6MTY3NjQzNjQxOH0.jlBId03AYp5gRn1aTY2YinWPzTIZzmSgMzXujlvpkIAmseH7TpL4FCfdJLvZFFtlLjN9Pe_AYfcMtdTwJLm_OA\" \\\n        -X POST http://localhost:8085/test-auth\n    \n    Output: {\"msg\":\"Token is valid\"}\n\n## Source code structure\n#### Source code java\n    /java\n      /com.luvina.la\n        /config\n          /jwt\n        /controller\n        /dto (Contains DTO class, intermediate class that transfer data between payload and entity)\n        /entity (Contains entity class, attribute mapping with table)\n        /mapper\n        /payload (Contains Request/Response class)\n        /repository\n        /service\n          /impl\n\n#### Resource file:\n    /resources\n      /config\n        /application.yaml (common config file)\n        /application-dev.yaml (config file for development environment)\n        /application-prod.yaml (config file for production environment)\n      /db\n        /migration (contains sql script files for migrate database: V\u003cversion\u003e__\u003cdescription\u003e.sql)\n      /logback-spring.xml (config output log level for package)\n\n### Flyway database migration enable/disable\n    spring\n      flyway:\n        enabled: true\n\n`enabled: true` auto execute sql script in file resources/db/migration/Vx__\u003cdescription\u003e.sql\nSQL Script version information is managed in the `flyway_schema_history` table\n\n### Reference Documentation\n\nFor further reference, please consider the following sections:\n\n* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)\n* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.7.4/maven-plugin/reference/html/)\n* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.7.4/reference/htmlsingle/#using.devtools)\n* [Flyway Migration](https://docs.spring.io/spring-boot/docs/2.7.4/reference/htmlsingle/#howto.data-initialization.migration-tool.flyway)\n* [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/2.7.4/reference/htmlsingle/#appendix.configuration-metadata.annotation-processor)\n* [Spring Web](https://docs.spring.io/spring-boot/docs/2.7.4/reference/htmlsingle/#web)\n* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.7.4/reference/htmlsingle/#data.sql.jpa-and-spring-data)\n\n### Guides\n\nThe following guides illustrate how to use some features concretely:\n\n* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)\n* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)\n* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)\n* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)\n* [MapStruct Mapper](https://www.tutorialspoint.com/mapstruct/mapstruct_basic_mapping.htm)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrucka312%2Fjava_springboot_jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrucka312%2Fjava_springboot_jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrucka312%2Fjava_springboot_jwt/lists"}