{"id":20496329,"url":"https://github.com/andrehertwig/spring-boot-starter-velocity2","last_synced_at":"2025-04-13T18:21:01.766Z","repository":{"id":57730320,"uuid":"112648074","full_name":"andrehertwig/spring-boot-starter-velocity2","owner":"andrehertwig","description":"Spring-Boot auto configuration for Velocity 2.0 Template Engine","archived":false,"fork":false,"pushed_at":"2019-03-08T15:34:23.000Z","size":24,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T09:04:06.151Z","etag":null,"topics":["apache-velocity","spring-boot","spring-boot-starter","template-engine"],"latest_commit_sha":null,"homepage":null,"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/andrehertwig.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":"2017-11-30T18:52:00.000Z","updated_at":"2021-04-10T07:31:18.000Z","dependencies_parsed_at":"2022-09-26T22:01:22.367Z","dependency_job_id":null,"html_url":"https://github.com/andrehertwig/spring-boot-starter-velocity2","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrehertwig%2Fspring-boot-starter-velocity2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrehertwig%2Fspring-boot-starter-velocity2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrehertwig%2Fspring-boot-starter-velocity2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrehertwig%2Fspring-boot-starter-velocity2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrehertwig","download_url":"https://codeload.github.com/andrehertwig/spring-boot-starter-velocity2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248758934,"owners_count":21157057,"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":["apache-velocity","spring-boot","spring-boot-starter","template-engine"],"created_at":"2024-11-15T18:06:34.776Z","updated_at":"2025-04-13T18:21:01.744Z","avatar_url":"https://github.com/andrehertwig.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring-Boot auto configuration for Velocity 2.0 Template Engine\r\n\r\n\u003e Just a Spring-Boot starter for Velocity 2.0 Template Engine.\r\n\r\nThis starter just appends the [Velocity Engine 2.0](http://velocity.apache.org/engine/2.0/) to Spring context and you can configure it via spring properties.\r\nBecause Velocity-Tools is still in version 2.0 and incompatible to Velocity-Template-Engine 2.0 there is no implmentation for tools.\r\nFurthermore this starter does not provide any ViewResolver.\r\n\r\n[![Maven Central](https://img.shields.io/maven-central/v/de.chandre.velocity2/spring-boot-starter-velocity2.svg)](https://mvnrepository.com/artifact/de.chandre.velocity2)\r\n[![GitHub issues](https://img.shields.io/github/issues/andrehertwig/spring-boot-starter-velocity2.svg)](https://github.com/andrehertwig/spring-boot-starter-velocity2/issues)\r\n[![license](https://img.shields.io/github/license/andrehertwig/spring-boot-starter-velocity2.svg)](https://github.com/andrehertwig/spring-boot-starter-velocity2/blob/develop/LICENSE)\r\n\r\nThis is just a spare-time project. The usage of this tool (especially in production systems) is at your own risk.\r\n\r\n# Content\r\n\r\n1. [Requirements, Dependencies](#requirements-dependencies)\r\n2. [Usage](#usage)\r\n3. [Configuration Properties](#configuration-properties)\r\n4. [Additional Things](#additional-things)\r\n\r\n## Requirements, Dependencies\r\n* spring-boot\r\n* apache velocity 2.0\r\n* apache velocity tools 3.0 (optional)\r\n\r\nUnit-Tested with Spring Boot 1.5.6, 1.5.19\r\n\r\n## Usage\r\n\r\n```xml\r\n\r\n\u003cdependency\u003e\r\n\t\u003cgroupId\u003ede.chandre.velocity2\u003c/groupId\u003e\r\n\t\u003cartifactId\u003espring-boot-starter-velocity2\u003c/artifactId\u003e\r\n\t\u003cversion\u003e1.1.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n\t\r\n```\r\n\r\nMaybe you have to explicitly enable the component scan for the package:\r\n```java\r\n\r\n@SpringBootApplication\r\n@EnableAutoConfiguration\r\n@ComponentScan(basePackages={\"your.packages\", \"de.chandre.velocity2.spring\"})\r\npublic class MyBootApplication {\r\n \r\n}\r\n```\r\n\r\n## Configuration Properties\r\n\r\nFor special configuration, please check the [additional-spring-configuration-metadata.json](src/main/resources/META-INF/additional-spring-configuration-metadata.json) \r\n\r\n## Additional Things\r\n\r\nIf you want to add velocity properties at runtime while application start-up, you are able to do that by implementing the `de.chandre.velocity2.spring.Velocity2PropertiesOverrideHook`.\r\n\r\nExample:\r\n\r\n```java\r\n@Configuration\r\n@AutoConfigureBefore(Velocity2AutoConfiguration.class)\r\npublic class VelocityConfig\r\n{\r\n\tprivate static final Logger LOGGER = LogManager.getFormatterLogger(VelocityConfig.class);\r\n\t\r\n\t@Bean\r\n\tpublic Velocity2PropertiesOverrideHook velocity2PropertiesOverrideHook(MyResourceManager rcMgr) {\r\n\t\treturn new Velocity2PropertiesOverrideHook() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Properties override(Properties velocityProperties) {\r\n\t\t\t\tvelocityProperties.put(RuntimeConstants.RESOURCE_MANAGER_INSTANCE, rcMgr);\r\n\t\t\t\treturn velocityProperties;\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrehertwig%2Fspring-boot-starter-velocity2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrehertwig%2Fspring-boot-starter-velocity2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrehertwig%2Fspring-boot-starter-velocity2/lists"}