自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 问答 (1)
  • 收藏
  • 关注

原创 使用hibernate进行CURD操作

一、编写HibernateUtil工具 public class HibernateUtil { private static SessionFactory sessionFactory; private static Session session; private static Transaction transaction; //static静态代码在类加载时初始化,在构造方法

2017-08-09 17:57:24 560

原创 spring、hibernate整合核心配置文件applicationContext.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:context="http://www.springframework.org/schema/context"        xmlns:aop="http://www.springframework.org/schema/aop"        xmlns:

2017-07-25 10:15:08 572

原创 CommonUtils

public class CommonUtil { private static Logger logger=Logger.getLogger(CommonUtil.class); /** * 使用正则表达式获取数字 * @param start * @param end * @param source 匹配的源字符串 * @return */ public stat

2017-07-21 16:06:11 808

原创 解决httpclient 4.5 https请求跳过证书验证

public class SslUtil { public static CloseableHttpClient SslHttpClientBuild() { Registry socketFactoryRegistry = RegistryBuilder.create().register("http", PlainConnectionSocketFactory.INSTANCE).r

2017-07-21 16:04:38 12034 2

原创 java连接ssh服务

public class Shell { private static Logger logger = Logger.getLogger(Shell.class); private String ip;//远程主机的IP地址 private String username;//远程主机的用户名 private String password;//远程主机的密码 private int p

2017-07-20 19:23:34 1688

原创 selenium连接浏览器 Chrome IE Firefox java

public class WebDriverUtil { private static Logger logger = Logger.getLogger(TestTemplate.class); protected static final int CHROME_DRIVER = 1; protected static final int FIREFOX_DRIVER = 2; prote

2017-07-18 18:21:30 532

原创 ReporterInfo

package com.sun.utils; import org.testng.Assert; public class ReporterInfo { public static void log(boolean condition){ Assert.assertTrue(condition); } public static void log(String message,b

2017-07-18 15:22:38 291

原创 gradle标准配置文件build.gradle

group 'com.sun' version '1.0-SNAPSHOT' apply plugin: 'java' sourceCompatibility = 1.8 repositories { mavenCentral() maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } }

2017-07-15 15:20:02 4827

原创 maven镜像配置settings.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">  d:/.m2/repository

2017-07-12 20:52:10 2697

原创 gradle多项目聚合的build.gradle

allprojects{ apply plugin: 'java' sourceCompatibility = 1.8 } subprojects{ repositories { mavenLocal() jcenter{ url "http://maven.ipo.com/nexus/content/groups/public/"}

2017-07-11 17:43:27 1996

原创 HttpClientUtil2

package com.sun.utils; import com.sun.model.http.HttpRequest; import com.sun.model.http.HttpResponse; public HttpResponse doGet(HttpRequest httpRequest){ HttpGet httpGet=new HttpGet(http

2017-07-05 17:28:07 375

原创 HttpClientUtil

public class HttpClientUtil { private static Logger logger= Logger.getLogger(HttpClientUtil.class); private CloseableHttpClient httpClient; private void init(){ httpClient= HttpCl

2017-07-05 17:27:30 428

原创 切入点

@Component @Aspect public class MyAspectAnno { // 执行updata语句时添加切入点 @Pointcut("execution(int com.anhouse.ta.esf.domain.orm.impl.XqDaoImpl.*(..))") public void aspectDao() { } @AfterThrowing(

2017-06-26 16:53:58 417

原创 testNG测试配置文件testng.xml

xml version="1.0" encoding="UTF-8"?> suite SYSTEM "http://testng.org/testng-1.0.dtd"> name="suiteONE" > name="TestONE"> 包测试--> --> --> --> 类测试-->

2017-06-21 14:20:05 1952

原创 testng测试报告相关pom文件

xml version="1.0" encoding="UTF-8"?> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4

2017-06-21 11:19:50 1407

原创 mybatis配置文件常用语法mapper.xml

xml version="1.0" encoding="UTF-8"?> mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> namespace="com.sun.dao.UserDao"> 封装sql条件,封装可以重用-->

2017-04-13 16:59:07 1258

原创 spring、mybatis整合核心配置文件applicationContext.xml

xml version="1.0" encoding="UTF-8"?> xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.o

2017-04-12 17:39:52 2050

原创 pom.xml

xml version="1.0" encoding="UTF-8"?> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4

2017-04-12 17:32:45 310

原创 java正则表达式

public class CommonUtil { int[] num; //在source中查找start和end中间的字符串 public static String findMatchString(String source, String start, String end) { Pattern p = Pattern.compile(start + "(.*)" + end);

2017-04-07 16:35:22 298

原创 schema

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.spring

2017-03-31 20:52:38 474

原创 testng+spring整合

package com.sun.base; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; @ContextConfiguration("classpath*

2017-03-31 18:02:43 1025

转载 读取excel2

/** * 是否有下一行 */ @Override public boolean hasNext() { if (this.rowNum == 0 || this.curRowNo >= this.rowNum) { book.close(); return false; } if (this.singleline > 0 && this.curRowNo > this.sing

2017-03-15 12:58:49 311

转载 读取excel 头

public class ExcelProviderByEnv implements Iterator { private final static Logger LOG4J_LOGGER = Logger.getLogger(ExcelProviderByEnv.class); private Workbook book = null; private Sheet shee

2017-03-15 12:57:45 635

转载 读取excel

public ExcelProviderByEnv(Object aimob, String aimmathod, String envParameter) { // 读取文件 try { String excelNameString = aimob.getClass().toString().contains("java.lang.String") ? aimob.toString

2017-03-15 12:56:19 290

原创 json转换为中文

public static String UnicodeDecode(String msg) { String str=null; try { str = new String(msg.getBytes("utf-8"), "utf-8"); } catch (Exception e) { e.printStackTrace(); } return str;

2017-02-27 14:02:06 3934

原创 常用地址(java)

自动化框架:http://jbehave.org/index.html selenium :https://github.com/easonhan007/webdriver_guide

2017-02-21 22:21:00 542

转载 一个web页面的访问的过程

Browers是如何在浩瀚的互联网上找到我们需要的资源呢? 以下将记录这个过程,这个过程是web编程需要需要熟知的。 用户打开浏览器输入目标地址(比如http://www.sina.com),那么接下来发生什么事情呢?   1,浏览器首先会查询本机的系统,获取主机名对应的IP地址。 2,若本机查询不到相应的IP地址,则会发起DNS请求,获取主机名对应的IP地址。 3,使用查询到

2017-02-14 11:08:15 4577

转载 谈自动化测试框架思想与构建

谈自动化测试框架思想与构建 2011-06-03 17:06 散步的SUN 51Testing软件测试博客 字号:T | T 自动化测试一般是指软件测试的自动化,软件测试就是在预设条件下运行系统或应用程序,评估运行结果,预先条件应包括正常条件和异常条件。本文介绍的是自动化测试框架思想与构建,一起来看。 AD:51CTO 网+ 第十二期沙龙:大话数据之美_如何用数据

2017-02-14 09:58:15 240

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除