摘要: 基本环境搭建 1、 创建Maven工程 2、 导入项目相关依赖的jar包 spring springmvc mybatis mysql junit spring-test lombok devtools <?xml version="1.0" encoding="UTF-8"?> <project 阅读全文
posted @ 2020-09-27 17:28 幻竹 阅读(379) 评论(0) 推荐(1)
摘要: 整型变量: 基本型(int) 短整型(short) 长整型(long) 无符号型(unsigned) 所占字节跟计算机系统和编译器有关 阅读全文
posted @ 2020-09-26 23:22 幻竹 阅读(142) 评论(0) 推荐(0)
摘要: ServletContext 什么是ServletContext? 答: 当Web容器启动时,它会为每个应用程序创建一个对应ServletContext对象,代表当前Web应用,并且它被所有客户端共享。 多个Servlet通过ServletContext对象实现数据共享 通过ServletConte 阅读全文
posted @ 2020-09-24 23:58 幻竹 阅读(160) 评论(0) 推荐(0)
摘要: 1、 搭建项目 2、 定义Controller 2.1、 实现Controller接口 @org.springframework.stereotype.Controller("/test01") public class TestController01 implements Controller 阅读全文
posted @ 2020-09-22 00:33 幻竹 阅读(229) 评论(0) 推荐(0)
摘要: 解决中文乱码问题 自定义404和500页面 <!--web.xml配置--> <error-page> <error-code>404</error-code> <location>/404.html</location> </error-page> <error-page> <error-code 阅读全文
posted @ 2020-09-18 17:43 幻竹 阅读(168) 评论(0) 推荐(0)
摘要: OSI参考模型和TCP/IP模型: HTTP的特点: 无连接 无状态 UDP(User Datagram Protocol): 用户数据报协议,它是无连接的通信协议,发送端不会确认接收端是否存在,就会发出数据;同样接收端接收到数据,也不会向发送端反馈是否接收到数据。数据被限制在64kb以内。 TCP 阅读全文
posted @ 2020-09-15 00:14 幻竹 阅读(124) 评论(0) 推荐(0)
摘要: SimpleMappingExceptionResolver <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <property name="defaultErrorView" 阅读全文
posted @ 2020-08-28 20:03 幻竹 阅读(122) 评论(0) 推荐(0)
摘要: <mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/**"/> <mvc:exclude-mapping path="/login"/> <bean class="com.example.demo.config.MyInterceptor 阅读全文
posted @ 2020-08-28 16:33 幻竹 阅读(88) 评论(0) 推荐(0)
摘要: 编写jsp <%-- Created by IntelliJ IDEA. User: 60434 Date: 2020/8/26 Time: 10:40 To change this template use File | Settings | File Templates. --%> <%@ pa 阅读全文
posted @ 2020-08-26 16:03 幻竹 阅读(109) 评论(0) 推荐(0)
摘要: 定义转换器类 package com.example.demo.config; import org.springframework.core.convert.converter.Converter; import java.text.ParseException; import java.text 阅读全文
posted @ 2020-08-25 22:33 幻竹 阅读(116) 评论(0) 推荐(0)