#CEP

PowerMockito使用PowerMockIgnore注解消除类加载器引入的ClassCastException

ThereasonisthattheXMLframeworktriestoinstantiateclassesusingreflectionanddoesthisfromthethreadcontextclassloader(PowerMock'sclassloader)butthentriestoassignthec...

解决java.io.IOException: Cannot run program "javac"问题,并设置jdk版本

原因:没有配置java路径解决方法:设置java_home路径 设置jdk版本是10的方法:在sbt文件中添加一行:javacOptions:=Seq("-target","10")然后重新执行命令:sbt,就可以了。假如是jdk8,则变成:javacOptions:=Seq("-target","1.8")...

spring报错:Caused by: java.lang.IllegalStateException: Cannot convert value of type for property : no matching editors or conversion strategy found

原因分析:是因为类返回的类型跟期望的类型没有继承关系,返回的类型就SqlMapClient,它是通过实现了FactoryBean<SqlMapClient>接口的SqlMapClientFactoryBean类的实例方法getObjectType()方法获取的,返回值是SqlMapClient,而期望的类型...

spring mvc中拦截器配置mvc:interceptors

其实在mvc:interceptors标签中,有两种类型的配置,一种直接配置一个bean(bean和ref归为一类),另一种还要配置上拦截的路径和排除的路径。直接配置的bean那就代表对所有的请求进行拦截,而对于mvc:interceptor则代表有着更精细的控制。而mvc:interceptors的属性path-ma...

org.mockito.exceptions.misusing.CannotStubVoidMethodWithReturnValue

错误原因:mock的时候,不能mock重载的方法解决方法:直接mock它的父类的方法org.mockito.exceptions.misusing.CannotStubVoidMethodWithReturnValue:'flush'isa*voidmethod*andit*cannot*bestubbedwitha*...

org.mockito.exceptions.misusing.MissingMethodInvocationException: when() requires an argument which has to be 'a method call on a mock'

异常原因:1.mockito的jar包中缺少方法2.mock方法的时候,返回的是对象,而对象没有重写equals方法3.mock的实例方法调用方法错误解决方法:1.用powermock中的api解决问题,在类中添加:@RunWith(PowerMockRunner.class)2.如果是第二种情况,则需要重写返回对象的...

java.lang.NoClassDefFoundError: ch/qos/logback/core/joran/spi/JoranException

问题描述:启动tomcat服务器的时候,报找不到JoranException类的异常原因:tomcat中没有logback-core-1.1.2.jar包解决方法:在tomcat中的lib目录添加logback-core-1.1.2.jar包,问题解决...

java.lang.IllegalArgumentException: Request header is too large的解决方法

<Connectorport="8080"protocol="HTTP/1.1"              connectionTimeout="20000" &n...

SpringSecurity-FilterSecurityInterceptor的作用

  FilterSecurityInterceptor也是很重要的一个interceptor,它的作用是对request进行权限判断,允许访问或者抛出accessDenied异常。  这个类继承AbstractSecurityInterceptor,它的代码很多,但是主要的逻辑有两步:(1)查询出request所需的角...

SpringSecurity-ExceptionTranslationFilter的作用

  ExceptionTranslationFilter捕获异常并做相应的处理。处理逻辑如下:  1.首先判断是不是SpringSecurity产生的异常,如果是将在handleSpringSecurityException(request,response,chain,ase)处理,否则抛出ServletExcept...

DESCryptoServiceProvider 类加密解密

DESCryptoServiceProvider 点击查看介绍加密解密辅助类:点击查看私钥加密定义:定义一个包装对象来访问加密服务提供程序(CSP)版本的数据加密标准(DES)算法。 此类不能被继承。研究这个类不如去研究它的父类,所以我们把重点转移到Des这个类Des定义:表示数据加密标准(DES)...

requests.exceptions.SSLError: hostname '127.0.0.1' doesn't match None

http://stackoverflow.com/questions/33429453/python-requests-ssl-hostname-doesnt-match-errorhttp://www.cnblogs.com/tk091/p/3671160.html...

Jenkins的slave异常:Exception in thread "main" java.lang.ClassNotFoundException: hudson.remoting.Launcher

当任务分配到slave上执行时,报如下错误:ParsingPOMsEstablishedTCPsocketon38257maven33-agent.jaralreadyuptodatemaven33-interceptor.jaralreadyuptodatemaven3-interceptor-commons.jar...

痛苦的 java.net.BindException: Address already in use: connect —— Nacos的坑

我的dubbo应用,刚开始的时候,启动一两个是没有问题的,启动多了就大量出现:2019-05-0820:41:24.869ERROR2548---[TaskScheduler-1]o.s.c.a.nacos.discovery.NacosWatch:ErrorwatchingNacosServicechangejava...
首页上一页...3132333435...下一页尾页