wit-core

A template-like script and engine, all written with Java.

License

License

GroupId

GroupId

org.febit.wit
ArtifactId

ArtifactId

wit-core
Last Version

Last Version

2.7.0-beta
Release Date

Release Date

Type

Type

jar
Description

Description

wit-core
A template-like script and engine, all written with Java.
Project Organization

Project Organization

Febit

Download wit-core

How to add to project

<!-- https://jarcasting.com/artifacts/org.febit.wit/wit-core/ -->
<dependency>
    <groupId>org.febit.wit</groupId>
    <artifactId>wit-core</artifactId>
    <version>2.7.0-beta</version>
</dependency>
// https://jarcasting.com/artifacts/org.febit.wit/wit-core/
implementation 'org.febit.wit:wit-core:2.7.0-beta'
// https://jarcasting.com/artifacts/org.febit.wit/wit-core/
implementation ("org.febit.wit:wit-core:2.7.0-beta")
'org.febit.wit:wit-core:jar:2.7.0-beta'
<dependency org="org.febit.wit" name="wit-core" rev="2.7.0-beta">
  <artifact name="wit-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.febit.wit', module='wit-core', version='2.7.0-beta')
)
libraryDependencies += "org.febit.wit" % "wit-core" % "2.7.0-beta"
[org.febit.wit/wit-core "2.7.0-beta"]

Dependencies

compile (2)

Group / Artifact Type Version
org.slf4j : slf4j-api Optional jar 1.7.25
commons-logging : commons-logging-api Optional jar 1.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Febit Wit

BSD License Build Status QQ Group: 302505483

This is a template engine, all written in Java, support Java 8+.

How to use

  • Maven:
<dependency>
    <groupId>org.febit.wit</groupId>
    <artifactId>wit-core</artifactId>
    <version>2.6.0</version>
</dependency>
  • or Gradle
compile 'org.febit.wit:wit-core:2.6.0'
  • demo:
Engine engine = Engine.create();
Template template = engine.getTemplate("/demo.wit");
template.merge(params, out);

Hello Wit

Hello Wit!
<%
var books
{
    for(book : books){
%>
${for.iter.index}.《${book.name} ¥${book.price}
<%
    }
}
{
    var func = function(a, b){
        return a + b + arguments[3]
    }
    echo func("a", "b", "c")
}
{
    var map = {
        books,
        1: 1,
        "key2": "value2",
        3: 2 + 1
    }
    map[5] = 2 + 3
    map.~put("6", 2*3)
    for(key, value : map){
        echo key + ":" +value + "\n"
    }
}
%>

More examples

Official Support

  • Jodd Madvoc
  • Spring MVC
  • Servlet & Filter

Demo

License

Febit Wit is released under the BSD License. See the bundled LICENSE file for details.

Third-party Licenses

Bug report

github-issue

org.febit.wit

Versions

Version
2.7.0-beta
2.6.0
2.5.0-beta
2.4.0-beta
2.3.0-beta
2.2.0-beta
2.1.0-beta
2.0.0-beta