在谈前后分离前,我们先看看什么是前后一体的.当我们用javaweb开发网站时,最终我们渲染的jsp或者springthymeleaf.我们的页面其实是WEB-INFO或者templates下.当用户请求我们的xxx页面资源其实并不是请求的真正的页面,而是经过我们controller处理完,产生mod ...
分类:
其他好文 时间:
2019-11-13 10:47:33
阅读次数:
60
一、操作步骤 ①使用idea新建一个Spring Boot项目 ②修改pom.xml ③修改application.properties ④修改编写一个Hello Spring Boot的Controller ⑤启动项目访问 二、详细步骤 1、File-->New-->Project 2、选择Spr ...
分类:
编程语言 时间:
2019-11-12 01:19:44
阅读次数:
100
1.底层类 package com.gxuwz.spring_thymeleaf.entity;public class Person { private String name; private Integer age; public Person(){ super(); } public Per ...
分类:
编程语言 时间:
2019-11-10 17:16:32
阅读次数:
113
<div class="showing"> <h2>条件判断</h2> <p th:if="${testBoolean}" >如果testBoolean 是 true ,本句话就会显示</p> <p th:if="${not testBoolean}" >取反 ,所以如果testBoolean 是 ...
分类:
其他好文 时间:
2019-11-09 19:18:45
阅读次数:
124
Java秒杀系统方案优化-高性能高并发实战 1:springboot thymeleaf配置 spring.thymeleaf.cache=falsespring.thymeleaf.content-type=text/htmlspring.thymeleaf.enabled=truespring. ...
分类:
编程语言 时间:
2019-11-09 11:45:25
阅读次数:
84
目的: 1、thymeleaf模板 2、Freemarker模板 thymeleaf模板 thymeleaf 的优点: 支持html5标准,页面无须部署到servlet开发到服务器上,直接通过浏览器就能打开(有无网络都行)。 上代码案例: pom文件中添加对应jar包依赖 <dependency> ...
分类:
编程语言 时间:
2019-11-08 20:43:20
阅读次数:
109
Thymeleaf模板 关于Thymeleaf的优点,我只说一条:它就是html页面。 Thymeleaf的pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-t ...
分类:
编程语言 时间:
2019-11-08 19:06:43
阅读次数:
88
select根据后台集合显示下列列表 <select class="form-control" name="parentId" > <option ></option> <option th:each="a : ${menus}" th:text="${a.name}" th:value="${a. ...
分类:
其他好文 时间:
2019-11-07 19:40:55
阅读次数:
203
1. Spring Boot application startersspring-boot-starter-thymeleaf使用Thymeleaf视图构建MVC Web应用程序 spring-boot-starter-ws使用Spring Web服务。1.4不推荐使用,推荐使用spring-bo ...
分类:
编程语言 时间:
2019-11-07 12:52:49
阅读次数:
88
认识Thymeleaf【读音同 thyme leaf英 [taim li:f] 美 [ta?m lif]】 Thymeleaf是一个流行的模板引擎,该模板引擎采用Java语言开发; 模板引擎是一个技术名词,是跨领域跨平台的概念,在Java语言体系下有模板引擎,在C#、PHP语言体系下也有模板引擎,甚 ...
分类:
编程语言 时间:
2019-10-31 23:33:08
阅读次数:
109