上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页
摘要: 重定向redirect不需要视图解析器;因为重定向是request请求,因此不能访问WEB-INF目录 阅读全文
posted @ 2022-01-14 09:41 卡卡发 阅读(44) 评论(0) 推荐(0)
摘要: 1.简化URL 2.实现请求地址一样,请求方式不同 阅读全文
posted @ 2022-01-14 09:27 卡卡发 阅读(28) 评论(0) 推荐(0)
摘要: web.xml中配置DispatcherServlet; @Controller这个注解会走视图解析器; @RequestMapping; 阅读全文
posted @ 2022-01-13 17:17 卡卡发 阅读(39) 评论(0) 推荐(0)
摘要: 配置web.xml,注册DispatcherServlet(请求分发器,前端控制器) 阅读全文
posted @ 2022-01-13 15:17 卡卡发 阅读(60) 评论(0) 推荐(0)
摘要: 先创建一个普通的maven项目(module),再加入Web app的支持(相比直接建一个maven的web项目,这样建立可以得到一个比较简洁的web.xml) 阅读全文
posted @ 2022-01-13 10:26 卡卡发 阅读(55) 评论(0) 推荐(0)
摘要: 1.声明式事务:AOP(不影响原有代码) UserMapper接口: package com.kakafa.mapper; import com.kakafa.pojo.User; import java.util.List; public interface UserMapper { public 阅读全文
posted @ 2022-01-08 11:18 卡卡发 阅读(44) 评论(0) 推荐(0)
摘要: 第一种方法 1.需要导入的包: pom.xml: <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scop 阅读全文
posted @ 2022-01-07 16:36 卡卡发 阅读(251) 评论(0) 推荐(0)
摘要: 什么是AOP: 在Spring中使用AOP: 使用Spring实现AOP需要导入一个包: <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> <dependency> <groupId>org.aspectj</ 阅读全文
posted @ 2022-01-07 11:24 卡卡发 阅读(101) 评论(0) 推荐(0)
摘要: 需要了解两个类Proxy和InvocationHandler Proxy:代理 InvocationHandler:调用处理程序 Rent: package com.kakafa.demo01; //需要被代理的接口 public interface Rent { public void rent( 阅读全文
posted @ 2022-01-06 17:06 卡卡发 阅读(36) 评论(0) 推荐(0)
摘要: JAVA配置和注解配置区别 阅读全文
posted @ 2022-01-06 15:27 卡卡发 阅读(130) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 28 下一页