{"id":21131376,"url":"https://github.com/jrop/spring-mvc-rythm","last_synced_at":"2025-03-14T12:24:01.276Z","repository":{"id":14353849,"uuid":"17063492","full_name":"jrop/spring-mvc-rythm","owner":"jrop","description":"Rythm templates for Spring MVC","archived":false,"fork":false,"pushed_at":"2014-02-21T19:18:59.000Z","size":116,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T10:49:06.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jrop.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}},"created_at":"2014-02-21T17:10:19.000Z","updated_at":"2015-12-03T10:04:38.000Z","dependencies_parsed_at":"2022-09-21T11:40:41.483Z","dependency_job_id":null,"html_url":"https://github.com/jrop/spring-mvc-rythm","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/jrop%2Fspring-mvc-rythm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fspring-mvc-rythm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fspring-mvc-rythm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrop%2Fspring-mvc-rythm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrop","download_url":"https://codeload.github.com/jrop/spring-mvc-rythm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243574438,"owners_count":20313054,"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":[],"created_at":"2024-11-20T05:55:07.450Z","updated_at":"2025-03-14T12:24:01.256Z","avatar_url":"https://github.com/jrop.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rythm Templates for Spring MVC\n\n## Setup\n\nAdd the three Java files (`RythmEngineFactory.java`, `SimpleRythmView.java`, and `SimpleRythmViewResolver.java`) to your project under a package `info.jrop.spring.rythm.viewresolver`.\n\nAdd this dependency to your `pom.xml`:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.rythmengine\u003c/groupId\u003e\n        \u003cartifactId\u003erythm-engine\u003c/artifactId\u003e\n        \u003cversion\u003e1.0-b10\u003c/version\u003e\n    \u003c/dependency\u003e\n\nIn your `servlet-context.xml`, comment out the bean that initializes the `InternalResourceViewResolver`, and add the following XML:\n\n    \u003cbeans:bean class=\"info.jrop.spring.rythm.viewresolver.SimpleRythmViewResolver\"\u003e\n        \u003cbeans:property name=\"rootDirectory\" value=\"/WEB-INF/views/\" /\u003e\n        \u003cbeans:property name=\"suffix\" value=\".html\" /\u003e\n    \u003c/beans:bean\u003e\n\nYou can now create Rythm views in the /WEB-INF/views/ subdirectory (based on the above configuration).\n\n# Example\n\nSay in my `HomeController` I have the following action:\n\n    @RequestMapping(value = \"/rythm/{name}\", method = RequestMethod.GET)\n    public String rythm(Model model, @PathVariable String name) {\n        model.addAttribute(\"name\", name);\n        return \"rythm\"; // denotes that the view for this action is named \"rythm.html\" (or, more generally, \"rythm.\u003csuffix\u003e\")\n    }\n\nThen, I can have two views in the /WEB-INF/views/ folder:\n\n### rythm.html\n\n    @extends(layout)\n    @args String name\n    Hello, @name!\n\n### layout.html\n\n    \u003ch1\u003eWelcome\u003ch1\u003e\n    @render()\n\nIn this case, the rendered HTML for a request at `localhost/my-app/rythm/World` would be:\n\n    \u003ch1\u003eWelcome\u003ch1\u003e\n    Hello, World!\n\n# Licence\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Jonathan Apodaca\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Fspring-mvc-rythm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrop%2Fspring-mvc-rythm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrop%2Fspring-mvc-rythm/lists"}