Skip to main content

B1.Meepo Hero Template

trydoforOriginalMeepoTemplateAbout 1 min

B1.Meepo Hero Template

Maven Central  Sonatype Snapshots  Coverage Status 

Meepo, Five are stronger than one. Divided they stand, united they fall.

a non-professional template engine that does not break the master syntax, and is based on the comments and markup of the master syntax.

meepo

The syntax of most modern template engines will break the syntax of the target file when previewing and editing.

Meepo solves this problem with high performance like C's macro by using only static transformations and limited dynamic control.

  • Generate *.java from java, both are compilable.
  • Generate *.sql from sql, both are executable.
  • Generate *.htm from htm, both are previewable.
  • placeholder supports customizing variable's boundaries and escaping
  • flexible and efficient customizing (dynamic, static, runtime) function using java

B1.1.How to use

① DIY clone and install is powerful.

② Using Maven Central is stable.

<dependency>
    <groupId>pro.fessional</groupId>
    <artifactId>meepo</artifactId>
    <version>${meepo.version}</version>
</dependency>

③ Using SNAPSHOT is the latest.

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

B1.2.Standalone use

Meepo provides common methods and caching that can handle the most common scenarios.

  • File template - use Meepo as entry, #parse, #merge
  • Placeholder template - use Holder as entry, #piece
  • String Parsing - use Parser to construct Gene, #parse

you can customize the use of Parser and Gene to combine the tool as you need.

B1.3.Mvc Integration

spring-mvc module integrates with SpringMvc, can be used independently or pre-processed with other templates.

<dependency>
    <groupId>pro.fessional.meepo</groupId>
    <artifactId>spring-mvc</artifactId>
    <version>${meepo-spring.version}</version>
</dependency>

B1.4.Spel Integration

spring-spel module registers the spel engine, provide spring Bean and SpEL.

<dependency>
    <groupId>pro.fessional.meepo</groupId>
    <artifactId>spring-spel</artifactId>
    <version>${meepo-spring.version}</version>
</dependency>