{"id":14977540,"url":"https://github.com/vrudas/spring-framework-examples","last_synced_at":"2025-10-12T02:39:13.805Z","repository":{"id":37985010,"uuid":"331738297","full_name":"vrudas/spring-framework-examples","owner":"vrudas","description":"An educational project with Spring Framework examples. Used for lectures at courses.","archived":false,"fork":false,"pushed_at":"2024-12-10T03:40:59.000Z","size":3410,"stargazers_count":41,"open_issues_count":2,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-17T05:58:29.234Z","etag":null,"topics":["java","jwt-authentication","oauth2-client","remember-me","spring","spring-boot","spring-framework","spring-framework-5","spring-guides","spring-mvc","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vrudas.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}},"created_at":"2021-01-21T19:53:22.000Z","updated_at":"2024-12-10T03:40:25.000Z","dependencies_parsed_at":"2023-12-22T04:29:22.321Z","dependency_job_id":"f55846f6-785b-4d73-81bd-f42f13fb9bbe","html_url":"https://github.com/vrudas/spring-framework-examples","commit_stats":{"total_commits":345,"total_committers":4,"mean_commits":86.25,"dds":0.4492753623188406,"last_synced_commit":"f2f29fd7d71a944b2d4920c76934962e148fbcef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrudas%2Fspring-framework-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrudas%2Fspring-framework-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrudas%2Fspring-framework-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrudas%2Fspring-framework-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrudas","download_url":"https://codeload.github.com/vrudas/spring-framework-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230471175,"owners_count":18231193,"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","jwt-authentication","oauth2-client","remember-me","spring","spring-boot","spring-framework","spring-framework-5","spring-guides","spring-mvc","spring-security"],"created_at":"2024-09-24T13:55:50.844Z","updated_at":"2025-10-12T02:39:08.776Z","avatar_url":"https://github.com/vrudas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/vrudas/spring-framework-examples/assets/8240025/9d664274-e5b0-431b-8c09-9c29d9b92fa0\" alt=\"Spring Logo\" width=\"256\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\n    Spring Framework Examples\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    An educational project with Spring Framework examples. Used for lectures at courses.\n\u003c/p\u003e\n\n## Related links\n- [Spring Framework Documentation](https://docs.spring.io/spring-framework/docs/current/reference/html/)\n- [Spring Core Technologies](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html)\n- [Spring Guides](https://spring.io/guides)\n- [Spring Quickstart Guide](https://spring.io/quickstart)\n- [Properties with Spring and Spring Boot](https://www.baeldung.com/properties-with-spring)\n- [An Intro to the Spring DispatcherServlet](https://www.baeldung.com/spring-dispatcherservlet)\n- [Design Pattern - Front Controller Pattern](https://www.tutorialspoint.com/design_pattern/front_controller_pattern.htm)\n- [Introduction to Using Thymeleaf in Spring](https://www.baeldung.com/thymeleaf-in-spring-mvc)\n- [Servlet Filter and Handler Interceptor](https://medium.com/techno101/servlet-filter-and-handler-interceptor-spring-boot-implementation-b58d397d9dbd)\n- [Error Handling for REST with Spring](https://www.baeldung.com/exception-handling-for-rest-with-spring)\n- [Spring 5, Embedded Tomcat 8, and Gradle: a Quick Tutorial](https://auth0.com/blog/spring-5-embedded-tomcat-8-gradle-tutorial/)\n- [Spring Boot Reference Documentation](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/)\n\n## Spring Security 6 Migration links\n- [Migrating to 6.0](https://docs.spring.io/spring-security/reference/migration/index.html)\n- [Spring Security without the WebSecurityConfigurerAdapter](https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter)\n\n## Important information\n- The module [example-17-authorization](example-17-authorization) has an issue https://github.com/vrudas/spring-framework-examples/issues/101 that was caused because of update to Spring Security 6\n\n## Example 21 - JWT Instructions\n\nPlease note that IntelliJ IDEA [HTTP Client](https://blog.jetbrains.com/idea/2020/09/at-your-request-use-the-http-client-in-intellij-idea-for-spring-boot-restful-web-services/) was used to perform requests in code snippets\n\nPlease follow the steps to perform a demo of how to get a JWT token for an existing user:\n\n- Perform login action\n```HTTP request\nPOST http://localhost:8080/login?username=user\u0026password=user\nAccept: application/json\n```\n\n- Extract the generated Bearer token from a response header `Authorization: Bearer \u003ctoken\u003e`\n```\nHTTP/1.1 200\nVary: Origin\nVary: Access-Control-Request-Method\nVary: Access-Control-Request-Headers\nAuthorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ1c2VyIiwiZXhwIjoxNjc4ODM2OTY1fQ.Afagk8no-r2kUiDOdtjWMT06gYPHkrhCoOSoK5_X6k8BC8Lr6k5rB-9gyoE72-lkd0rx1sEPET-3Uf7KP-7BrQ\nX-Content-Type-Options: nosniff\nX-XSS-Protection: 0\nCache-Control: no-cache, no-store, max-age=0, must-revalidate\nPragma: no-cache\nExpires: 0\nX-Frame-Options: DENY\nContent-Length: 0\nDate: Tue, 14 Mar 2023 23:35:05 GMT\nKeep-Alive: timeout=60\nConnection: keep-alive\n\n\u003cResponse body is empty\u003e\n```\n\n- Use the generated Bearer token to perform the call to an endpoint by providing the `Authorization: Bearer \u003ctoken\u003e` header\n```HTTP request\nGET http://localhost:8080/users/me\nAccept: application/json\nAuthorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ1c2VyIiwiZXhwIjoxNjc4ODM1NjE5fQ.cRZ1ob4XZfG5RnU0jl2kdPihc9Ln-BlEOe7hbuwZJWp-UuQSGukI_57pWrBcdaCWPN-8luCF08YWU74tUErOFg\n```\n\n\u003ch2 align=\"center\"\u003e\n    Contribution statistic\n\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://repobeats.axiom.co/api/embed/ea96de66d99f0b7879faf1dd630824e3b2339f78.svg\" alt=\"Repobeats analytics image\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrudas%2Fspring-framework-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrudas%2Fspring-framework-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrudas%2Fspring-framework-examples/lists"}