实事上keycloak框架使用了freemaker进行页面部署,在页面上使用了vue进行了渲染,还是比较跟的上技术前沿的,只不过,keycloak没有使用spring框架,可能是因为它是redhat公司推出的产品吧。
依赖引用
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- FreeeMarker模板引擎所需依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
配置文件
spring:
freemarker:
suffix: .ftl # 设置模板后缀名
content-type: text/html # 设置文档类型
charset: UTF-8 # 设置页面编码格式
cache: false # 设置页面缓存
template-loader-path: classpath:/templates # 设置ftl文件路径
mvc:
static-path-pattern: /static # 设置静态文件路径ÿ