前后端分离现在越来越多,如何有效的使用springboot来整合我们的页面是一个很重要的问题。

springboot整合freemarker有以下几个步骤,也总结下我所犯的错误:

1、加依赖:

2、配置文件修改:

3、在templates下面编写后缀为ftl的页面:

4、错误出现:404问题:

(1)检查是@RestController还是@Controller,如果要返回页面必须用@Controller

(2)这次问题出现的很粗心:(漏掉一个小点)

springboot整合freemarker的更多相关文章

  1. springboot 整合 freemarker

    springboot 整合 freemarker 依赖 <parent> <groupId>org.springframework.boot</groupId> & ...

  2. SpringBoot整合freemarker 引用基础

    原 ElasticSearch学习笔记Ⅲ - SpringBoot整合ES 新建一个SpringBoot项目.添加es的maven坐标如下: <dependency> <groupI ...

  3. 【SpringBoot】09.SpringBoot整合Freemarker

    SpringBoot整合Freemarker 1.修改pom文件,添加坐标freemarker启动器坐标 <project xmlns="http://maven.apache.org ...

  4. SpringBoot学习8:springboot整合freemarker

    1.创建maven项目,添加pom依赖 <!--springboot项目依赖的父项目--> <parent> <groupId>org.springframewor ...

  5. springboot整合freemarker(转)

    添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sp ...

  6. SpringBoot整合Freemarker+Mybatis

    开发工具 , 开始 新建工程 .选择Spring Initializr 下一步 下一步,选择需要的组件 ..改一下工程名,Finish ..目录结构 首先,修改pom文件 然后,将applicatio ...

  7. Spring-Boot整合freemarker引入静态资源css、js等

    一.概述 springboot 默认静态资源访问的路径为:/static 或 /public 或 /resources 或 /META-INF/resources 这样的地址都必须定义在src/mai ...

  8. Spring-Boot整合freemarker引入静态资源css、js等(转)

    一.概述 springboot 默认静态资源访问的路径为:/static 或 /public 或 /resources 或 /META-INF/resources 这样的地址都必须定义在src/mai ...

  9. springboot整合freemarker模板引擎后在页面获取basePath绝对路径

    在项目中引用静态资源文件或者进行ajax请求时我们有时候会使用 ${basePath} ,其实这就是一种获取绝对路径的方式: 那么在springboot项目中要怎么配置才能使用 basePaht呢? ...

随机推荐

  1. springboot undertow替换tomcat方式

    版权声明: https://blog.csdn.net/weixin_38187317/article/details/81532560说明        undertow,jetty和tomcat可 ...

  2. h5定位geolaction无法调试解决方法

    昨天接到一个在h5获取经纬度的需求,看了文档后,代码其实很简单,但在浏览器上调试就比较蛋疼了... 代码: function successfulCallback(position) { consol ...

  3. tensorflow win10 系统下安装

    安装tensorflow gpu版本 Step1 安装CUDA8.0 进入这个云盘地址下载,密码5aoc 进行CUDA8.0下载.下载完成后解压,打开exe文件直接按照默认进行安装,安装步骤比较繁琐, ...

  4. Mac+Docker环境下xdebug的配置

    由于容器化的需要,前几天我本地也换成了docker环境.就研究了一下docker环境下phpstorm和xdebug的配置. http://www.mmfei.com/?p=453 这个博客给出了一个 ...

  5. 震旦199打印机扫描A4文件

    1.需要扫描的A4文件放入输稿器 2.使用数据线将打印机.电脑连接 3.在电脑中右键打印机,选择扫描功能 4.如下图,选择选项后,点击扫描即可

  6. 如何自定义一个组件loading

    使用时需要Vue.use()一下

  7. [转帖] .NET FrameWork 版本的确定方法

    检测电脑安装的net framework版本   https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx To find .N ...

  8. git 快捷键

    实际上就是弄了个别名 $ git config --global alias.st status $ git config --global alias.ci commit $ git config ...

  9. 关于更改ListBox的ItemsPanel样式

    首先定义一个ListBoxItem的样式,用来显示相应的图片信息 <Style TargetType="{x:Type ListBoxItem}" > <Sett ...

  10. codeforces472B

    Design Tutorial: Learn from Life CodeForces - 472B One way to create a task is to learn from life. Y ...