SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

时间:2023-03-09 21:58:50
SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

菜鸟教程:http://www.runoob.com/

http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js

http://apps.bdimg.com/libs/angular-route/1.3.13/angular-route.js

http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js

http://cdn.bootcss.com/respond.js/1.4.2/respond.js

参考资料:

angular下载:https://github.com/angular/angular.js/releases

jquery下载:http://jquery.com/download/

jqueryui下载:http://jqueryui.com/download/

bootstrap下载: http://getbootstrap.com/

一、准备工作

1、html资源

http://blog.****.net/u012702547/article/details/53784992

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

从这一段源码中我们可以看到默认的页面后缀名为.html,前缀为classpath:/templates/,实际上也就是我们需要把html页面放到resources文件夹下的templates文件夹中。同时我们也看到了要如何修改这个配置,在application.properties文件中以spring.thymeleaf为前缀来配置相关属性。

2、引入静态资源

Bootstrap下载

jQuery下载

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

3、404页面

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

4、SpringMVC定制

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

5、自定义Favicon

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

二、准备工作

1、后台代码

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

2、前台代码

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)

3、功能测试

SpringBoot入门:新一代Java模板引擎Thymeleaf(实践)