1. 程式人生 > >springboot 整合beetl

springboot 整合beetl

1.pom檔案

<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.5.RELEASE</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>com.ibeetl</groupId>
			<artifactId>beetl-framework-starter</artifactId>
			<version>1.1.63.RELEASE</version>
		</dependency>
	</dependencies>

2.配置檔案src/main/resources/application.properties

beetl.suffix=html

3.java程式碼

@RequestMapping("test")
	public String test(){
		
		return "test.html";
	}

4.頁面src/main/recources/templates/test.html

<%
var message="hello world";
%>
${message}

5.效果