{"id":23099481,"url":"https://github.com/hiwepy/security-jwt-spring-boot-starter","last_synced_at":"2026-04-18T19:30:58.452Z","repository":{"id":57720039,"uuid":"124192694","full_name":"hiwepy/security-jwt-spring-boot-starter","owner":"hiwepy","description":"Spring Security 整合 JWT 登录","archived":false,"fork":false,"pushed_at":"2025-03-06T15:55:08.000Z","size":513,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T13:53:29.424Z","etag":null,"topics":["jwt","security","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiwepy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-07T06:53:55.000Z","updated_at":"2023-10-22T11:58:19.000Z","dependencies_parsed_at":"2023-01-31T07:45:57.601Z","dependency_job_id":"cdf12699-741c-4028-96c6-0296292827b3","html_url":"https://github.com/hiwepy/security-jwt-spring-boot-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hiwepy/security-jwt-spring-boot-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiwepy%2Fsecurity-jwt-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiwepy%2Fsecurity-jwt-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiwepy%2Fsecurity-jwt-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiwepy%2Fsecurity-jwt-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiwepy","download_url":"https://codeload.github.com/hiwepy/security-jwt-spring-boot-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiwepy%2Fsecurity-jwt-spring-boot-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31982405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["jwt","security","spring-boot"],"created_at":"2024-12-16T23:19:20.322Z","updated_at":"2026-04-18T19:30:58.429Z","avatar_url":"https://github.com/hiwepy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# security-jwt-spring-boot-starter\r\n\r\nsecurity starter for spring boot\r\n \r\n### 组件简介\r\n\r\n\u003e 基于 Security 的 Spring Boot Starter 实现\r\n\r\n主要 扩展 Security + JWT 与Spring Boot的整合，实现通过yaml配置即可实现权限拦截扩展，类似Shiro的 shiro.ini 配置方式\r\n\r\n### 使用说明\r\n\r\n##### 1、Spring Boot 项目添加 Maven 依赖\r\n\r\n``` xml\r\n\u003cdependency\u003e\r\n\t\u003cgroupId\u003ecom.github.hiwepy\u003c/groupId\u003e\r\n\t\u003cartifactId\u003esecurity-jwt-spring-boot-starter\u003c/artifactId\u003e\r\n\t\u003cversion\u003e${project.version}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n##### 2、在`application.yml`文件中增加如下配置\r\n\r\n```yaml\r\nspring:\r\n  # Spring Security 配置\r\n  security:\r\n    # 默认路径拦截规则定义\r\n    filter-chain-definition-map:\r\n      '[/]' : anon\r\n      '[/**/favicon.ico]' : anon\r\n      '[/webjars/**]': anon\r\n      '[/assets/**]' : anon\r\n      '[/error*]' : anon\r\n      '[/logo/**]' : anon\r\n      '[/swagger-ui.html**]' : anon\r\n      '[/swagger-resources/**]' : anon\r\n      '[/doc.html**]' : anon\r\n      '[/bycdao-ui/**]' : anon\r\n      '[/v2/**]' : anon\r\n      '[/kaptcha*]' : anon\r\n      '[/actuator*]' : anon\r\n      '[/actuator/**]' : anon\r\n      '[/druid/*]' : ipaddr[192.168.1.0/24]\r\n      '[/monitoring]' : roles[admin]\r\n      '[/monitoring2]' : roles[1,admin]\r\n      '[/monitoring3]' : perms[1,admin]\r\n      '[/monitoring4]' : perms[1]\r\n    stateless: true\r\n    jwt:\r\n      authc:\r\n        enabled: true\r\n        continue-chain-before-successful-authentication: false\r\n        login-url-patterns: /login/jwt\r\n        password-parameter: pwd\r\n        post-only: true\r\n        use-forward: false\r\n      authz:\r\n        enabled: true\r\n        allow-session-creation: false\r\n        continue-chain-before-successful-authentication: true\r\n        path-pattern: /**\r\n```\r\n\r\n##### 3、使用示例\r\n\r\n```java\r\n SecurityPrincipal principal = SubjectUtils.getPrincipal(SecurityPrincipal.class);\r\n```\r\n\r\n## Jeebiz 技术社区\r\n\r\nJeebiz 技术社区 **微信公共号**、**小程序**，欢迎关注反馈意见和一起交流，关注公众号回复「Jeebiz」拉你入群。\r\n\r\n|公共号|小程序|\r\n|---|---|\r\n| ![](https://raw.githubusercontent.com/hiwepy/static/main/images/qrcode_for_gh_1d965ea2dfd1_344.jpg)| ![](https://raw.githubusercontent.com/hiwepy/static/main/images/gh_09d7d00da63e_344.jpg)|\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiwepy%2Fsecurity-jwt-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiwepy%2Fsecurity-jwt-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiwepy%2Fsecurity-jwt-spring-boot-starter/lists"}