今天做项目的时候,发现每次拦截器日志都会打两遍,很纳闷,怀疑是Filter被执行了两遍.结果debug之后发现还真是!记录一下这个神奇的BUG! 问题描述 项目中使用的是Spring-security作为权限框架,然后做了一个JwtAuthenticationTokenFilter作为拦截器拦截请求,校验Token,但是每次请求都会打两遍日志.下面是精简的源代码: 自定义的Filter类 @Slf4j @Component public class JwtAuthenticationTokenF
SqlCommand对象的字符串SQL命令可以做多个,以查询为例,用到SqlDataReader的一些方法,如ExecuteReader(),Read()(一条命令内的移动至下一记录),NextResult()(移动到下一个命令并执行). using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.SqlClient; using System.Da
1.TreeView选择事件执行两次 Very often, we need to execute some code in SelectedItemChanged depending on the selected TreeViewItem. ButSelectedItemChanged is called twice. This is due to stealing focus from the main window, which is screwing something up. Wha
https://issues.apache.org/jira/browse/SUREFIRE-753 Here the pom.xml snippet how i configured the report-plugin: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <ve