springboot
qq_320253624
这个作者很懒,什么都没留下…
展开
-
springboot整合mybatis
1.导入依赖<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version&a原创 2019-02-17 13:29:11 · 103 阅读 · 0 评论 -
springboot整合dubbo
1 .创建一个生产者工程导入依赖:<!--dubbo启动器--> <dependency> <groupId>com.gitee.reger</groupId> <artifactId>spring-boot-starter-dubbo</artif原创 2019-02-24 16:28:04 · 100 阅读 · 0 评论 -
springboot整合jsp
1.创建springboot工程加入依赖 <!--引入Spring Boot内嵌的Tomcat对JSP的解析包--> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId&原创 2019-03-02 16:57:52 · 97 阅读 · 0 评论 -
springboot整合拦截器
1、按照Spring mvc的方式编写一个拦截器类package com.hbsc.interceptor;import org.springframework.web.servlet.HandlerInterceptor;import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.Http...原创 2019-03-02 19:33:22 · 221 阅读 · 0 评论 -
springboot整合事物
1、在入口类中使用注解 @EnableTransactionManagement 开启事务支持;2、在访问数据库的Service方法上添加注解 @Transactional 即可;原创 2019-03-02 19:36:28 · 125 阅读 · 0 评论 -
springboot整合serlvet
1、编写一个普通的Servletpublic class HeServlet extends HttpServlet { private static final long serialVersionUID = -4134217146900871026L; @Override public void doGet(HttpServletRequest req, HttpSe...原创 2019-03-02 19:39:25 · 103 阅读 · 0 评论 -
springboot整合过滤器
1、编写一个普通的Filterpublic class HeFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest request, ...原创 2019-03-02 19:41:49 · 1100 阅读 · 0 评论 -
spingboot解决乱码
@Beanpublic FilterRegistrationBean filterRegistrationBean() { FilterRegistrationBean registrationBean = new FilterRegistrationBean(); CharacterEncodingFilter characterEncodingFilter = new Cha...原创 2019-03-02 19:50:04 · 158 阅读 · 0 评论 -
springboot整合redis缓存
1、在pom.xml中配置相关的jar依赖;<!-- 加载spring boot redis包 --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artif...原创 2019-03-02 20:21:44 · 161 阅读 · 0 评论