{"id":19656313,"url":"https://github.com/daggerok/spring-boot-functional-servlet-example","last_synced_at":"2026-05-13T18:18:37.290Z","repository":{"id":151042045,"uuid":"179597776","full_name":"daggerok/spring-boot-functional-servlet-example","owner":"daggerok","description":"This is a later spring web (2.2.0.BUILD-SNAPSHOT) with functional servlet functionality!","archived":false,"fork":false,"pushed_at":"2019-04-05T16:37:56.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-10T00:42:23.212Z","etag":null,"topics":["assembly","functional","gradle-kotlin-dsl","gradle-zip","kotlin-dsl","maven-assembly","maven-assembly-plugin","maven-zip","mvc-fn","spring-functional","spring-web-fuctional"],"latest_commit_sha":null,"homepage":null,"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/daggerok.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":"2019-04-05T00:39:19.000Z","updated_at":"2019-04-05T16:37:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"81a6c64e-7d97-4058-8ebe-7c6fd9b4080a","html_url":"https://github.com/daggerok/spring-boot-functional-servlet-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-functional-servlet-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-functional-servlet-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-functional-servlet-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fspring-boot-functional-servlet-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/spring-boot-functional-servlet-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240964663,"owners_count":19885787,"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":["assembly","functional","gradle-kotlin-dsl","gradle-zip","kotlin-dsl","maven-assembly","maven-assembly-plugin","maven-zip","mvc-fn","spring-functional","spring-web-fuctional"],"created_at":"2024-11-11T15:27:25.009Z","updated_at":"2026-05-13T18:18:32.254Z","avatar_url":"https://github.com/daggerok.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Functional Servlet MVC [![Build Status](https://travis-ci.org/daggerok/spring-boot-functional-servlet-example.svg?branch=master)](https://travis-ci.org/daggerok/spring-boot-functional-servlet-example)\nThis is a later spring web (2.2.0.BUILD-SNAPSHOT) with functional servlet functionality!\n\n## Key items\n\n### Functional Servlet based Routes\n\n```java\n@Configuration\npublic class FunctionalRouter {\n\n  @Bean\n  public RouterFunction\u003cServerResponse\u003e routes() {\n    return RouterFunctions.route()\n                          .POST(\"/fn\", request -\u003e ServerResponse.ok().body(\"Functional hello!\"))\n                          .GET(\"/**\", request -\u003e ServerResponse.ok().body(\"_self: \" + request.path()))\n                          .filter((request, next) -\u003e {\n                            var response = next.handle(request);\n                            var headers = HttpHeaders.writableHttpHeaders(response.headers());\n                            headers.add(\"X-FUNCTIONAL\", \"It's fucking awesome!\");\n                            return response;\n                          })\n                          .build();\n  }\n}\n```\n\n## Build, run and test\n\n```bash\n./mvnw                    # or: ./gradlew\njava -jar ./target/*.jar  # or: ./build/libs/*.jar\n\nhttp :8080/fn body=world\nhttp :8080/mvc/\nhttp :8080/mvc body=hello\nhttp :8080/fn/\n```\n\n## zip sources (out of topic)\n\n```bash\n./gradlew sources # or ./mvnw package\n```\n\nlinks:\n\n* [YouTube: Spring Tips: WebMvc.fn - the functional DSL for Spring MVC](https://www.youtube.com/watch?v=vZV2_9KVHJU)\n* [See that useful article about zip with maven assembly](https://medium.com/@kasunpdh/using-the-maven-assembly-plugin-to-build-a-zip-distribution-5cbca2a3b052)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fspring-boot-functional-servlet-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fspring-boot-functional-servlet-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fspring-boot-functional-servlet-example/lists"}