本次发布主要支持SpringBoot3+Spring6+JDK17,也对项目结构做了调整
以SpringBoot3为例子
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl-spring-boot-starter</artifactId>
<version>3.14.1.RELEASE</version>
</dependency>
Java代码使用@EnableBeetl启用Beetl模板引擎
@SpringBootApplication
@EnableBeetl
public class TestSpringBootApplication {
public static void main(String[] args {
SpringApplication.run(TestSpringBootApplication.class, args;
}
}
如果是SpringBoot2,使用方法一样,需要使用如下依赖
<dependency>
<groupId>com.ibeetl</groupId>
<artifactId>beetl-spring-boot-starter-classic</artifactId>
<version>3.14.1.RELEASE</version>
</dependency>
其他更新包括POM结构做了调整:
beetl-core: 核心模块
beetl-ext: 扩展模块
beetl-integration: beetl和各个新框架集成,目前主要是springboot3
beetl-classic-integration beetl和各个框架集成,如springboot2,jfinal,nutz,struts等
beetl-test:beetl单元测试
express-benchmark: beetl 和其他表达式引擎性能测试比较
template-benchmark: beetl 和其他模板引擎性能测试比较
grammar:beetl的词法和语法文件
antlr-support: 支持antlr的各个版本,从antlr4.5到antlr4.11
beetl:集成对beetl-core,beetl-ext,antlr依赖,大多数项目依赖此即可
beeetl-dependency-all: 同beetl,把所有依赖打包成一个flat jar,用于非maven项目