spring家族
spring家族
奋进的白羊
Just do it
展开
-
SpringMVC注解2
看B站狂神SpringMVC视频所写 1.在pom.xml导入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0原创 2021-04-08 20:37:38 · 39 阅读 · 0 评论 -
SpringMVC-Servlet回顾
看B站狂神SpringMVC视频所写 1.在pom.xml导入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0原创 2021-04-08 19:47:26 · 78 阅读 · 0 评论 -
第一个SpringMVC项目
看B站狂神SpringMVC视频所写 1.在pom.xml导入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0原创 2021-04-08 20:02:32 · 54 阅读 · 0 评论 -
spring部分注解
1spring5注解 1.1 注解导入 1.使用注解时必须要有aop依赖 1.1需要在xml文件中导入context依赖 引入xsi:schemaLocation属性 xmlns:是XML NameSpace的缩写,因为XML文件的标签名称都是自定义的,自己写的和其他人定义的标签很有可能会重复命名,而功能却不一样,所以需要加上一个namespace来区分这个xml文件和其他的xml文件,类似于java中的package。 xsi:schemaLocation用于声明了目标名称空间的模式文档。 原创 2021-04-08 15:30:01 · 88 阅读 · 0 评论 -
json运行错误
看B站狂神SpringMVC视频所记笔记 json运行错误 使用json时,tomcat服务器要用tomcat8以上的,tomcat7控制台报500错误(GET http://localhost:8080/a 500 (Internal Server Error))原创 2021-04-10 22:32:57 · 332 阅读 · 0 评论 -
java注解
注解 注解1@SuppressWarnings 解释:抑制警告,会把下面警告信息去除,如下图 注解2@Param Teacher getTeacher2(@Param(“tid”) int id); 解释:如上面语句,Param会与xml文件中id进行匹配,如下: select * from wz.teacher where id=#{tid} ...原创 2021-03-07 20:17:31 · 63 阅读 · 0 评论 -
过滤器
1.SpringMVC乱码过滤器 <!--SpringMVC提供的乱码过滤器--> <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param>原创 2021-04-09 12:00:30 · 84 阅读 · 0 评论 -
随机id
package com.wxy.utils; import org.junit.jupiter.api.Test; import java.util.UUID; @SuppressWarnings(“all”)//抑制警告 replace:字符串替换 public class IDutils { public static String getId() { return UUID.randomUUID().toString().replace("-",""); } @Test public void tes原创 2021-03-07 20:23:51 · 201 阅读 · 0 评论 -
SpringMVC注解开发
看B站狂神SpringMVC视频所记笔记 1.在pom.xml导入依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4原创 2021-04-08 20:23:06 · 52 阅读 · 0 评论