摘要: 1、异步任务 异步方法调用是相当于多个线程执行,不需要等待上一行代码的执行结果。 使用方法: 启动类上面使用@EnableAsync注释,表示开启异步方法调用; 方法上使用@Async注解,来表示这是个异步方法; Future 用于接收异步方法的返回类型; get() 获取异步返回值 isDone( 阅读全文
posted @ 2020-03-04 16:19 门虫不是虫 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 <!--Swagger2依赖--> <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --> <dependency> <groupId>io.springfox</groupId> <artif 阅读全文
posted @ 2020-03-03 10:51 门虫不是虫 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 导入包 <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter --> <dependency> <groupId>org.mybatis.spring.boot 阅读全文
posted @ 2020-03-02 16:12 门虫不是虫 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 基于空的maven项目; <dependencies> <!-- https://mvnrepository.com/artifact/junit/junit --> <!--测试依赖包--> <dependency> <groupId>junit</groupId> <artifactI 阅读全文
posted @ 2020-03-01 16:10 门虫不是虫 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 1、配置 springmvc XML添加拦截器配置 <!--添加MVC拦截器--> <mvc:interceptors> <mvc:interceptor> <!--/** 包括路径及其子路径--> <!--/admin/* 拦截的是/admin/add等等这种 , /admin/add/user不 阅读全文
posted @ 2020-02-29 20:51 门虫不是虫 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 1.1 添加web的支持 1.2 servlet是必须的,需要用到jsp调试,那么jsp相关的包也需要导入。 <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> <dependency> < 阅读全文
posted @ 2020-02-29 20:22 门虫不是虫 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 官方链接:http://mybatis.org/spring/zh/transactions.html#configuration 1、依赖 tx和aop相关配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.spri 阅读全文
posted @ 2020-02-28 21:51 门虫不是虫 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 <dependencies> <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --> <dependency> <groupId>org.springframework</groupId> 阅读全文
posted @ 2020-02-28 20:45 门虫不是虫 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 1、配置 导入AspectJ Weaver包; xml配置aop相关; <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x 阅读全文
posted @ 2020-02-28 19:16 门虫不是虫 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1、依赖 java.lang.reflect.Proxy - 提供了静态方法去创建动态代理类的实例; Interface InvocationHandler - 一个代理实例调用处理程序实现的接口 2、编写代理实例处理类 public class InvocationHandlerProxy imp 阅读全文
posted @ 2020-02-28 15:05 门虫不是虫 阅读(174) 评论(0) 推荐(0) 编辑