{"id":20292719,"url":"https://github.com/neuland/spring-pug4j","last_synced_at":"2025-10-12T08:09:56.726Z","repository":{"id":57730764,"uuid":"296637162","full_name":"neuland/spring-pug4j","owner":"neuland","description":"pug4j spring integration","archived":false,"fork":false,"pushed_at":"2025-01-10T15:33:36.000Z","size":443,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-25T07:41:40.446Z","etag":null,"topics":["java","template-engine"],"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/neuland.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":"2020-09-18T14:01:07.000Z","updated_at":"2025-01-10T15:33:40.000Z","dependencies_parsed_at":"2024-11-14T15:18:47.261Z","dependency_job_id":"a966804d-6907-40e4-b449-c8e5c636e5e0","html_url":"https://github.com/neuland/spring-pug4j","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuland%2Fspring-pug4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuland%2Fspring-pug4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuland%2Fspring-pug4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuland%2Fspring-pug4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neuland","download_url":"https://codeload.github.com/neuland/spring-pug4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248382179,"owners_count":21094545,"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","template-engine"],"created_at":"2024-11-14T15:18:35.743Z","updated_at":"2025-10-12T08:09:56.703Z","avatar_url":"https://github.com/neuland.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Test Status](https://github.com/neuland/spring-pug4j/actions/workflows/test.yaml/badge.svg)](https://github.com/neuland/spring-pug4j/actions)\n\n# A Spring Integration for Pug4J\n\nSee [neuland/pug4j](https://github.com/neuland/pug4j) for more information.\n\n## Bean Declarations\n\napplicationContext.xml\n\n```xml\n\u003cbean id=\"templateLoader\" class=\"de.neuland.pug4j.spring.template.SpringTemplateLoader\"\u003e\n\t\u003cproperty name=\"templateLoaderPath\" value=\"classpath:/templates\" /\u003e\n\u003c/bean\u003e\n\n\u003cbean id=\"pugConfiguration\" class=\"de.neuland.pug4j.PugConfiguration\"\u003e\n\t\u003cproperty name=\"prettyPrint\" value=\"false\" /\u003e\n\t\u003cproperty name=\"caching\" value=\"false\" /\u003e\n\t\u003cproperty name=\"templateLoader\" ref=\"templateLoader\" /\u003e\n\u003c/bean\u003e\n\n\u003cbean id=\"viewResolver\" class=\"de.neuland.pug4j.spring.view.PugViewResolver\"\u003e\n\t\u003cproperty name=\"configuration\" ref=\"pugConfiguration\" /\u003e\n\t\u003c!-- rendering nice html formatted error pages for development --\u003e\n\t\u003cproperty name=\"renderExceptions\" value=\"true\" /\u003e\n\u003c/bean\u003e\n```\nOr, if you are using Spring JavaConfig:\n\n```java\n\n@Configuration\npublic class PugConfig {\n\n    @Bean\n    public SpringTemplateLoader templateLoader() {\n        SpringTemplateLoader templateLoader = new SpringTemplateLoader();\n        templateLoader.setTemplateLoaderPath(\"classpath:/templates\");\n        templateLoader.setEncoding(\"UTF-8\");\n        templateLoader.setSuffix(\".pug\");\n        return templateLoader;\n    }\n\n    @Bean\n    public PugConfiguration pugConfiguration() {\n        PugConfiguration configuration = new PugConfiguration();\n        configuration.setCaching(false);\n        configuration.setTemplateLoader(templateLoader());\n        return configuration;\n    }\n\n    @Bean\n    public ViewResolver viewResolver() {\n        PugViewResolver viewResolver = new PugViewResolver();\n        viewResolver.setConfiguration(pugConfiguration());\n        return viewResolver;\n    }\n}\n```\n### TemplateLoaderPath\nSpringTemplateLoader uses the ResourceLoader of the Spring Framework. For more information how to configure the templateLoaderPath see [ResourceLoader](https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/resources.html#resources-resourceloader)\n\nMost people use something like 'classpath:/templates' which points to a templates folder in your resources.\n\n## Versions\n### 3.1.0\n* update dependencies (thanks dbelyaev)\n* update to pug4j 2.1.0\n\n### 3.0.0\n* switch to jakarta servlet-api\n* support of spring framework 6\n* needs java 17\n\n## Usage\n\n### via Maven\n\nJust add following dependency definitions to your `pom.xml`.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ede.neuland-bfi\u003c/groupId\u003e\n  \u003cartifactId\u003espring-pug4j\u003c/artifactId\u003e\n  \u003cversion\u003e3.4.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Author\n\n- Stefan Kuper / [planetk](https://github.com/planetk)\n- Michael Geers / [naltatis](https://github.com/naltatis)\n- Christoph Blömer / [chbloemer](https://github.com/chbloemer)\n\n## License\n\nThe MIT License\n\nCopyright (C) 2012-2025 [neuland Büro für Informatik](http://www.neuland-bfi.de/), Bremen, Germany\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuland%2Fspring-pug4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneuland%2Fspring-pug4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuland%2Fspring-pug4j/lists"}