美文网首页
springboot+freemarker

springboot+freemarker

作者: jerrybw | 来源:发表于2017-07-26 17:45 被阅读0次

pom.xml

    <!-- 引入freeMarker的依赖包. -->
    <dependency>   
        <groupId>org.springframework.boot</groupId>  
        <artifactId>spring-boot-starter-freeMarker</artifactId>
    </dependency>

配置文件

template-loader-path: classpath:/templates/ freemarker模板所在路径


配置文件

编写ftl文件

ftl文件

编写controller

controller

相关文章

网友评论

      本文标题:springboot+freemarker

      本文链接:https://www.haomeiwen.com/subject/uoynkxtx.html