会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Arbitrary233
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
19
20
21
22
23
24
25
26
27
···
30
下一页
2020年3月21日
19、springboot——使用其他Servlet容器
摘要: 使用其他Servlet容器 -Jetty(长连接) -Undertow(不支持jsp) 替换为其他嵌入式Servlet容器 默认支持: Tomcat(默认使用) Jetty: <dependency> <groupId>org.springframework.boot</groupId> <arti
阅读全文
posted @ 2020-03-21 16:17 Arbitrary233
阅读(183)
评论(0)
推荐(0)
2020年3月20日
18、springboot——嵌入式servlet容器修改+注册servlet三大组件
摘要: SpringBoot默认使用Tomcat作为嵌入式的Servlet容器 1)、如何定制和修改Servlet容器的相关配置 1、修改和server有关的配置 (ServerProperties【也是EmbeddedServletContainerCustomizer】) server.port=808
阅读全文
posted @ 2020-03-20 16:05 Arbitrary233
阅读(251)
评论(0)
推荐(0)
17、springboot——定制错误响应(2)
摘要: 二、如何定制错误响应 1).如何定义错误处理页面 1.1、有模板引擎的情况下;error/状态码; 【将错误页面命名为 (错误状态码.html) 放在模板引擎文件夹里面的error文件夹下】 发生此状态码的错误就会来到 对应的页面; 可以使用4xx、5xx作为错误页面的文件名来匹配这种类型的所有错误
阅读全文
posted @ 2020-03-20 00:11 Arbitrary233
阅读(365)
评论(0)
推荐(0)
2020年3月19日
16、springboot——错误处理原理+定制错误页面(1)
摘要: 一、springboot默认的处理机制 1.浏览器返回一个错误的页面 默认处理错误:返回一个错误的页面: 包括错误类型、时间...... 2.其他客户端访问 默认响应一个json数据 原理: 错误自动配置的类:ErrorMvcAutoConfiguration.java 默认配置: @Bean @C
阅读全文
posted @ 2020-03-19 22:18 Arbitrary233
阅读(264)
评论(0)
推荐(0)
15、springboot——CRUD-跳转到修改员工页面+员工修改和删除实现 ⑥
摘要: 对于修改连接的uri 在list.html中 <a>标签本来就是已get方式提交 <a class="btn btn-sm btn-primary" th:href="@{/emp/} + ${emp.id} ">修改</a> 修改需要知道id,所以路径上需要有有该修改的员工id 两个属性是要进行拼
阅读全文
posted @ 2020-03-19 19:41 Arbitrary233
阅读(321)
评论(0)
推荐(0)
14、springboot——CRUD-跳转到添加员工页面+员工添加实现⑤
摘要: 一、跳转至添加员工页面 1、设置员工添加按钮链接(<a>标签本来就是以get方式提交) <a href="/emp" th:href="@{/emp}" class="btn btn-sm btn-success">员工添加</a> 2、跳转页面controller的实现 //跳转到添加员工的页面
阅读全文
posted @ 2020-03-19 16:38 Arbitrary233
阅读(425)
评论(0)
推荐(0)
13、springboot——CRUD-thymeleaf公共页面元素抽取④
摘要: 1、thymeleaf公共页面元素抽取 存在一种现象:两个文件的代码只有一部分代码不一样 其余的均相同,此时就可以提取公共的代码去简化开发 1、抽取公共片段 <div th:fragment="copy"> © 2011 The Good Thymes Virtual Grocery </
阅读全文
posted @ 2020-03-19 15:27 Arbitrary233
阅读(541)
评论(1)
推荐(0)
2020年3月18日
12、springboot——CRUD登录和拦截③
摘要: 一、登录跳转完成 1、前端页面的设置 login.html <input type="text" name="username" class="form-control" placeholder="Username" th:placeholder="#{login.username}" requir
阅读全文
posted @ 2020-03-18 22:16 Arbitrary233
阅读(200)
评论(0)
推荐(0)
11、springboot——CRUD国际化②
摘要: 以前使用springmvc国际化步骤 1)、编写国际化配置文件; 2)、使用ResourceBundleMessageSource管理国际化资源文件 3)、在页面使用fmt:message取出国际化内容 springboot国际化步骤: 步骤: 1)、编写国际化配置文件,抽取页面需要显示的国际化 在
阅读全文
posted @ 2020-03-18 19:17 Arbitrary233
阅读(166)
评论(0)
推荐(0)
2020年3月17日
10、springboot——CRUD导入静态资源以及设置默认访问首页①
摘要: 1、导入静态资源 这里我们将页面放在templates文件夹中,就是为了使用thymeleaf模板引擎功能 使用模板引擎需保证pom文件中导入了依赖 <!--引入thymeleaf模板引擎--> <dependency> <groupId>org.springframework.boot</grou
阅读全文
posted @ 2020-03-17 23:44 Arbitrary233
阅读(476)
评论(0)
推荐(0)
上一页
1
···
19
20
21
22
23
24
25
26
27
···
30
下一页
公告