2019年9月10日

springboot(3):整合Servlet,filter,listener

摘要: 1.springboot整合Servlet(2种方式) 添加maven依赖:spring-boot-starter-web 1>通过注解扫描完成Servlet组件的注册(方式1) 步骤:需要3步 1)自定义一个继承javax.servlet.http.HTTPServlet类的CustomServl 阅读全文

posted @ 2019-09-10 18:22 _ZXP 阅读(467) 评论(0) 推荐(0) 编辑

spring boot配置文件application.properties配置JPA以及数据源

摘要: 1.application.properties配置jpa模板 spring.datasource.url=jdbc:mysql://localhost:3306/springboottest?useUnicode=true&characterEncoding=utf8&serverTimezone 阅读全文

posted @ 2019-09-10 11:44 _ZXP 阅读(7352) 评论(0) 推荐(0) 编辑

springboot系列:使用缓存

摘要: 前言:springboot已经为我们实现了抽象的api接口,因此当我们使用不同的缓存时,只是配置有可能有点区别(比如ehcache和Redis),但是在程序中使用缓存的方法是一样的。 1.springboot使用ehcache缓存 1.步骤: 1.在pom.xml中配置2个依赖,添加spring-b 阅读全文

posted @ 2019-09-10 10:13 _ZXP 阅读(1028) 评论(0) 推荐(0) 编辑

导航