An open API service indexing awesome lists of open source software.

https://github.com/ghimisradu/spring-velocity-adapter

Velocity view resolver adapter for Spring 5
https://github.com/ghimisradu/spring-velocity-adapter

spring spring-velocity-adapter velocity

Last synced: 5 months ago
JSON representation

Velocity view resolver adapter for Spring 5

Awesome Lists containing this project

README

          

# spring-velocity-adapter
Velocity view resolver adapter for Spring 5

## Usage

Add the following dependency into your pom.xml:
```xml

com.shield-solutions
spring-velocity-adapter
1.0.0.RELEASE

```
Initialize the velocity view resolver inside your spring ```java @Configuration``` annotated classes:
```java
...
@Bean
public ViewResolver viewResolver() {
VelocityViewResolver viewResolver = new VelocityViewResolver();
viewResolver.setSuffix(".vm.html");
return viewResolver;
}
...
@Bean
public VelocityConfigurer velocityConfigurer() {
VelocityConfigurer vc = new VelocityConfigurer();
vc.setResourceLoaderPath("WEB-INF/velocity");
return vc;
}
```