Stella981 Stella981
3年前
JUnit4源码分析运行原理
提个问题:Java程序的入口是main方法,而JUnit类中没有main方法,那么JUnit是如何运行的呢?假如有以下JUnit例子:importorg.junit.Test;publicclassTestA{@TestpublicvoidtestAdd(){
Stella981 Stella981
3年前
HTTP请求中的form data和request payload的区别(request 后台无法获取参数)
转载自:btg.yoyo(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fhome.cnblogs.com%2Fu%2Fbtgyoyo%2F) jQuery的ajax方法和post方法分别发送请求,在后台Servlet进行处理时结果是不一样的,比如用$.ajax方法发送请求时(dat
Wesley13 Wesley13
3年前
C# 代码片段
一、List<byte和byte\\转换方法1:Byte bytes;     // 复制源List<Byte lbyte  new List<Byte;  // 复制目的方法2:// 迭代 bytes 数组中的内容后添加到 lbyte 中foreach(
Easter79 Easter79
3年前
Tomcat启动失败 提示Server Tomcat v7.0 Server at localhost failed to start.六种解决方法
Tomcat启动失败提示ServerTomcatv7.0Serveratlocalhostfailedtostart.六种解决方法参考文章:(1)Tomcat启动失败提示ServerTomcatv7.0Serveratlocalhostfailedtostart.六种解决方法(https://www.o
Stella981 Stella981
3年前
CentOS下宝塔如何部署Django项目?
基础环境装好宝塔服务宝塔里装好【Python项目管理器】宝塔里装好【Nginx】把Django项目代码发到服务器把代码放到服务器上有两种方法:方法一:服务器上安装Git,通过GitClone代码到服务器上方法二:通过宝塔的FTP工具把代码上传上去
Wesley13 Wesley13
3年前
Java异常处理
throws表示当前方法不处理异常,而是交给方法的调用出去处理;throw表示直接抛出一个异常;publicclassDemo1{/把异常向外面抛@throwsNumberFormatException/publi
Easter79 Easter79
3年前
Thread源码分析
start方法publicsynchronizedvoidstart(){/Thismethodisnotinvokedforthemainmethodthreador"system"groupthreadscreated/setupby
Wesley13 Wesley13
3年前
MySQL常用函数,你真得看看!
概念:相当于java中的方法,将一组逻辑语句封装在方法体中,对外暴露方法名隐藏了实现细节提高代码的可重用性使用:select函数名(实参列表)【from表】  【】中内容可省略正文:字符函数:length:获取字节个数(utf8一个汉字为3个字节,gb
Wesley13 Wesley13
3年前
5分钟掌握JUnit要点
第一分钟:声明测试方法新建一个类,在要测试的方法上面添加@Test注解importorg.junit.Test;importstaticorg.junit.Assert.assertEquals;publicclassUserServiceTest{@Testpublic
Wesley13 Wesley13
3年前
Java ConcurrentModificationException异常原因和解决方法
JavaConcurrentModificationException异常原因和解决方法参考文章:(1)JavaConcurrentModificationException异常原因和解决方法(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.codeprj.c