Skip to content

A Spring Boot Starter for velocity including Spring's official and Alibaba's implementation , e.g, Layout , Tools supports.

License

Notifications You must be signed in to change notification settings

obiteaaron/velocity-spring-boot-project

 
 

Repository files navigation

Velocity Spring Boot Project

A Spring Boot Starter for velocity including Spring's official and Alibaba's implementation , e.g, Layout , Tools supports.

Released version

    <dependencies>
        ...
        <!-- Spring Boot Starter -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>velocity-spring-boot-starter</artifactId>
            <version>1.0.4.RELEASE</version>
        </dependency>
        ...
    </dependencies>

If your project failed to resolve the dependency, try to add the following repository:

    <repositories>
        <repository>
            <id>sonatype-nexus</id>
            <url>https://oss.sonatype.org/content/repositories/releases</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

Features

Velocity Common support

Velocity Layout support

Velocity Tools support

Dependencies & Compatibility

Dependencies Compatibility
Java 1.7 +
Servlet 3.0 +
Spring Boot 1.4 +
Alibaba Spring Velocity Context Support 1.4.1.8 +
Alibaba Spring Boot Web Support 1.0.0 +
Alibaba Spring WebMVC Support 1.0.0 +
Alibaba Spring Context Support 1.0.0 +

Downstream Projects

Velocity常用配置

spring.velocity.resource-loader-path=classpath:/velocity/templates
spring.velocity.toolbox-config-location=/velocity/toolbox.xml
spring.velocity.layout-enabled=true
spring.velocity.layout-url=/velocity/layout/default.vm
spring.velocity.expose-model-and-view-to-context=true
spring.velocity.allow-model-and-view-to-context-override=true
spring.velocity.expose-model-and-view-to-tool=true
spring.velocity.allow-model-and-view-to-tool-override=true
spring.velocity.properties.eventhandler.referenceinsertion.class=org.apache.velocity.app.event.implement.EscapeHtmlReference
spring.velocity.properties.eventhandler.escape.html.match=/(^(?!(\\$\\!\\{screen_content\\}).*))(^(?!(\\$\\!tool.ignoreText\\(.+?\\)).*))(^(?!(\\$\\!\\{tool.ignoreText\\(.+?\\)\\}).*))/

About

A Spring Boot Starter for velocity including Spring's official and Alibaba's implementation , e.g, Layout , Tools supports.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%