- 浏览: 55734 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (93)
- java (3)
- ios (9)
- wp (15)
- android (0)
- js (1)
- 服务器 (0)
- db (0)
- linux (1)
- python (0)
- xcode (0)
- ide (2)
- maven (0)
- spring (0)
- sql (0)
- 第三方 (1)
- nexus (0)
- nginx (11)
- tomcat (0)
- jenkins (0)
- zookeeper (1)
- git (1)
- svn (0)
- uml (0)
- redis (4)
- activemq (1)
- flume (0)
- kafka (0)
- mysql (1)
- memcached (0)
- mybatis (0)
- mac (0)
- mongo (1)
- docker (6)
- cache (0)
- jvm (0)
- markdown (0)
- springboot (24)
- mycat (3)
- LTS (3)
- 运维 (0)
- opts (1)
- netty (1)
- tcc (0)
- ffmpeg (2)
- 直播 (6)
- cxf (0)
- nodejs (0)
- storm (0)
- elasticjob (0)
- php (0)
最新评论
pom.xml
============================================
<!-- Spring Boot Freemarker 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
============================================
application.properties
============================================
spring.freemarker.template-loader-path=classpath:/web/
spring.freemarker.cache=false
spring.freemarker.charset=UTF-8
spring.freemarker.check-template-location=true
spring.freemarker.content-type=text/html
spring.freemarker.expose-request-attributes=true
spring.freemarker.expose-session-attributes=true
spring.freemarker.request-context-attribute=request
spring.freemarker.suffix=.ftl
============================================
CityController.java
============================================
//如果返回"a/city" 会跳转到web/a目录下city.ftl
//city会跳转到web目录下city.ftl
@RequestMapping(value = "/api/city/{id}", method = RequestMethod.GET)
public String findOneCity(Model model, @PathVariable("id") Long id) {
model.addAttribute("city", cityService.findCityById(id));
return "city";
}
============================================
city.ftl
============================================
<!DOCTYPE html>
<html lang="en">
<body>
City name: ${city.cityName}<br>
City description:${city.description}
</body>
</html>
============================================
============================================
============================================
<!-- Spring Boot Freemarker 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
============================================
application.properties
============================================
spring.freemarker.template-loader-path=classpath:/web/
spring.freemarker.cache=false
spring.freemarker.charset=UTF-8
spring.freemarker.check-template-location=true
spring.freemarker.content-type=text/html
spring.freemarker.expose-request-attributes=true
spring.freemarker.expose-session-attributes=true
spring.freemarker.request-context-attribute=request
spring.freemarker.suffix=.ftl
============================================
CityController.java
============================================
//如果返回"a/city" 会跳转到web/a目录下city.ftl
//city会跳转到web目录下city.ftl
@RequestMapping(value = "/api/city/{id}", method = RequestMethod.GET)
public String findOneCity(Model model, @PathVariable("id") Long id) {
model.addAttribute("city", cityService.findCityById(id));
return "city";
}
============================================
city.ftl
============================================
<!DOCTYPE html>
<html lang="en">
<body>
City name: ${city.cityName}<br>
City description:${city.description}
</body>
</html>
============================================
============================================
发表评论
-
springboot:condition
2017-07-26 11:10 318public class LinuxCondition imp ... -
springboot:tomcat启动
2017-07-20 15:02 8801.在pom.xml里设置 <packaging> ... -
springboot:shiro
2017-07-13 15:52 909第一次学习系统学习shiro 并将shiro集成到sprin ... -
springboot:upload
2017-07-06 10:25 699FileUploadConfiguration.java == ... -
springboot:servlet
2017-07-06 10:17 459Application.java ============== ... -
springboot:task
2017-07-05 12:11 393TaskPool.java ================= ... -
springboot:热部署
2017-07-05 11:23 309pom.xml: ====================== ... -
springboot:注解
2017-07-04 11:36 566@EnableAutoConfiguration注解 excl ... -
springboot:server属性配置
2017-07-04 10:05 668server配置 ====================== ... -
springboot:memcached
2017-07-03 17:23 856pom.xml ======================= ... -
springboot:health
2017-07-03 16:43 346<dependency> ... -
springboot:mongodb
2017-07-03 15:38 1516pom.xml ======================= ... -
springboot:quartz集群
2017-07-02 20:40 952pom.xml ======================= ... -
springboot:ControllerAdvice
2017-07-02 14:09 336全局异常拦截 //@ControllerAdvice(anno ... -
springboot:dubbo
2017-07-02 10:40 463server: ======================= ... -
springboot:amq
2017-07-01 22:20 420pom.xml ======================= ... -
springboot:redis(jedis)
2017-07-01 14:10 860application.properties ======== ... -
springboot:mybatis&druid&pagehelper
2017-07-01 13:35 363=============================== ... -
springboot:logback
2017-06-30 16:20 481=============================== ... -
springboot:interceptor
2017-06-30 14:04 583IncpConfig.java 增加拦截器config 继承W ...
相关推荐
SpringBoot集成Freemarker+FlyingSaucer实现pdf在线预览.pdf
springboot整合freemarker生成静态html的demo 主要讲解了通过模板生成html和通过字符串生成html
基于SpringBoot+FreeMarker+MyBatis+ExtJs实现的一个通用后台管理系统,界面美观,适合快速迭代开发 项目说明 技术栈: SpringBoot MyBatis Redis MySQL FreeMarker ExtJs 基于SpringBoot+FreeMarker+MyBatis+...
springboot整合freemarker例子
1、基于SpringBoot+FreeMarker+MyBatis+ExtJs实现的一个通用后台管理系统源码(适合快速迭代开发).zip 2、该资源包括项目的全部源码,下载可以直接使用! 3、本项目适合作为计算机、数学、电子信息等专业的课程设计...
基于SpringBoot+freemarker实现的人事管理系统分为七大模块:绩效考核,招聘管理,档案管理,工资管理,考勤管理,培训管理,系统管理。本系统最大特色是有强大和灵活的权限控制功能,所有菜单,按钮功能均可由管理...
springboot集成freemarker的迷你案例,注意是迷你
基于SpringBoot+FreeMarker+MyBatis的通用后台管理系统源码(界面美观,适合快速迭代开发).zip基于SpringBoot+FreeMarker+MyBatis的通用后台管理系统源码(界面美观,适合快速迭代开发).zip基于SpringBoot+...
Springboot项目中: 1. 使用Apache POI 3.9 自定义样式导出Excel文件; 2. 使用freemarker动态生成word .doc文档(带图片Word以及复杂格式word) 详细说明见个人博客及 github: ...
freemarker前端框架换成任意的应该都没问题。 1、后台配置项返回格式出错,上传功能将不能正常使用! 后端配置项没有正常加载,上传插件不能正常使用...freemarker:随springboot layui-v2.5.4 ueditor1_4_3_3-utf8-jsp
该项目集成了SpringBoot、SpringMVC、MyBaits、Bootstrap3、Druid和Freemarker等多个框架。系统提供了完整的用户界面(UI)、增删改查(CRUD)及分页功能,同时具备防SQL注入和XSS攻击拦截等安全特性。通过该项目,...
实现的功能有: 管理员:系统管理、请假管理、公告管理、档案资料管理、通讯录管理、日常办公管理、邮箱管理消息管理等。 员工:登录、修改个人信息、请假(申请请假)、日常办公(工作日志、任务管理、日常管理)、...
Springboot+freemarker生成word,通过运行wordUtil里面main函数查看结果,包含图片显示等
springboot的完整例子demo源码 定时任务,连接池,全局异常,自定义配置文件,文件上传等等等 希望喜欢
一、项目运行 环境配置: Jdk1.8 + Tomcat8.0 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持) ...Springboot + SpringMVC + MyBatis + FreeMarker + JavaScript + JQuery + Ajax + maven等等。
网上找不到springboot框架集成freemarker过程中再集成shiro框架,所以写了一个,供大家使用。
springboot搭建freemarker
项目下载后自行修改application-dev.yml和jdbc.properties中的数据库链接。 启动项目后进入http://xxxx.xxxx.xxxx:xxx/swagger-ui.html查看相关接口,支持通过接口设置数据库链接切换后自动重启项目,代码生成器支持...
springboot 整合 Mybatis freemarker 全局异常抓取 静态页面
基于java+Springboot+FreeMarker+JPA求职招聘兼职网站毕业设计源码+数据库+使用文档(高分优秀项目) 该项目是个人高分毕业设计项目源码,已获导师指导认可通过,答辩评审分达到97分,在window10/11测试环境严格调试...