bean如果实现了接口,getBean的返回值要用接口来接收,不能直接用实现类,否则可能报:
java.lang.ClassCastException: com.sun.proxy.$Proxy9 cannot be cast to
wx62e0d796b5814 博主文章分类:Spring ©著作权
bean如果实现了接口,getBean的返回值要用接口来接收,不能直接用实现类,否则可能报:
java.lang.ClassCastException: com.sun.proxy.$Proxy9 cannot be cast to
上一篇:Java: Web项目
下一篇:设计模式:13-适配器模式
测试是软件发布的重要环节,单元测试在实际开发中是一种常用的测试方法,java单元测试主要用junit,最新是junit5,本人开发一般用junit4。因为单元测试能够在软件模块组合之前尽快发现问题,所以实际开发中投入产出比很高。实际使用难免会遇到异步操作的接口测试,最常用的情景是别人家的SDK封装了异步处理,需要用测试用例来验证SDK的流程,顺便测试参数的处理情况。由于异步testcase的
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M