java 杂项

2018-11-12  本文已影响0人  莫小西0213

泛型

1.泛型类。泛型接口。泛型方法。
2.T和Object区别

  1. 通配符T(Type) ,E(element),K(key),V(value),名字上的意义,没有差别;
  2. ?和T的区别

Filter

1.作用:实现url级别的拦截
2.实现:

 <filter>
        <filter-name>hap-enhance</filter-name>
        <filter-class>com.hand.hap.core.web.HapEnhanceFilter</filter-class>
        <async-supported>true</async-supported>
    </filter>
    <filter-mapping>
        <filter-name>hap-enhance</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
public abstract interface Filter{  
    public abstract void init(FilterConfig paramFilterConfig) throws ServletException;  
    public abstract void doFilter(ServletRequest paramServletRequest, ServletResponse paramServletResponse, FilterChain   
        paramFilterChain) throws IOException, ServletException;  
    public abstract void destroy();  
}  
  1. 实用教程https://blog.csdn.net/qq_27093465/article/details/79162517

PageHelper

1.如何使用分页插件https://pagehelper.github.io/docs/howtouse/
2.包括不安全分页,由ThreadLocal引起
3.QueryInterceptor 规范https://pagehelper.github.io/docs/interceptor/

上一篇下一篇

猜你喜欢

热点阅读