摘要: springboot整合mybatis一套开源框架:https://github.com/abel533/MyBatis-Spring-Boot 使用mybatis+分页插件pagehelper整合;pom org.mybatis.spring.boot mybatis-spring-boot-starter 1.3.1 tk.mybatis mapp... 阅读全文
posted @ 2018-12-25 19:22 紫月java 阅读(252) 评论(0) 推荐(0) 编辑
摘要: springboot使用AOP概述AOP是一种编程范式,与语言无关,是一 种程序设计思想 ;面向切面 (AOP): Aspect Oriented Programming 面向对象 (OOP) :Object Oriented Programming 面向过程 (POP) :Procedure Oriented Programming 使用案例:pom org.springframe... 阅读全文
posted @ 2018-12-25 19:19 紫月java 阅读(229) 评论(0) 推荐(0) 编辑
摘要: springboot拦截器 2.0之前的拦截器(WebMvcConfigurerAdapter) 使用注解 @Configuration配置拦截器 继承WebMvcConfigurerAdapter 重写addInterceptors 添加需要的拦截器地址 @Configuration public class WebMvcConfigurer extends WebMvcConfigu... 阅读全文
posted @ 2018-12-25 19:19 紫月java 阅读(171) 评论(0) 推荐(0) 编辑
摘要: springboot异步执行1.使用场景◆发送短信◆发送邮件◆App消息推送◆节省运维凌晨发布任务时间提供效率2.使用(1)配置注解:主类:@EnableAsync//开启异步调用方法任务类:类注解:@Component//注入springboot方法注解:@Async@Component public class AsyncTask { @Async public Future d... 阅读全文
posted @ 2018-12-25 19:18 紫月java 阅读(342) 评论(0) 推荐(0) 编辑
摘要: springboot整合Redispom org.springframework.boot spring-boot-starter-data-redis 1 2 3 org.springframework.boot4 spring-boot-starter-data-redis5 ap... 阅读全文
posted @ 2018-12-25 13:26 紫月java 阅读(233) 评论(0) 推荐(0) 编辑