摘要: Spring中ClassPathXmlApplication与FileSystemXmlApplicationContext的区别 一、概述 在项目中遇到加载不到Spring配置文件,简单分析后,写此文备忘! 二、测试所需资源 TestBean.java applicationContext.xml 阅读全文
posted @ 2018-04-05 13:18 GᎭ•Cristin 阅读(197) 评论(0) 推荐(0) 编辑
摘要: •http://blog.csdn.net/lkforce/article/details/60878295 •日志文件生成 •方法1 •jmap -dump:format=b,file=20170307.dump 16048 •方法2 •-Xms128m -Xmx128m -XX:+HeapDum 阅读全文
posted @ 2018-04-01 15:08 GᎭ•Cristin 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Aviator是一个轻量级、高性能的Java表达式执行引擎, 本文内容主要来自于官方文档 简介 包依赖 使用手册 执行表达式 使用变量 exec 方法 调用函数 自定义函数 编译表达式 访问数组和集合 三元操作符 正则表达式匹配 变量的语法糖 nil 对象 日期比较 大数计算和精度 字面量表示 运算 阅读全文
posted @ 2018-03-03 14:39 GᎭ•Cristin 阅读(2463) 评论(0) 推荐(0) 编辑
摘要: Apache Commons Email的Maven依赖 使用示例: 阅读全文
posted @ 2018-03-03 14:07 GᎭ•Cristin 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1.单例模式(Singleton Pattern) 定义:Ensure a class has only one instance, and provide a global point of access to it.(确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。) 通用代码 阅读全文
posted @ 2018-02-27 09:36 GᎭ•Cristin 阅读(164) 评论(0) 推荐(0) 编辑
摘要: post方式 就要考虑提交的表单内容怎么传输了。本文name和pass就是表单的值了。 封装表单属性可以用json也可以用传统的表单,如果是传统表单的话 要注意,也就是在上边代码注释那部分。用这种方式的话在servlet里也就是数据处理层可以通过request.getParameter(”strin 阅读全文
posted @ 2018-02-07 17:27 GᎭ•Cristin 阅读(187) 评论(0) 推荐(0) 编辑
摘要: package Cristin.Common.File; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.DirectoryFileFilter; import org.apache.co 阅读全文
posted @ 2018-01-22 21:06 GᎭ•Cristin 阅读(407) 评论(0) 推荐(0) 编辑
摘要: commons-beanutils是Apache开源组织提供的用于操作JAVA BEAN的工具包。使用commons-beanutils,我们可以很方便的对bean对象的属性进行操作。今天为大家介绍一下该包的常用方法。 在介绍常用类之前,我们先来 编写一个用于测试的BEAN类: package co 阅读全文
posted @ 2018-01-03 18:03 GᎭ•Cristin 阅读(713) 评论(0) 推荐(0) 编辑
摘要: 1.要有继承2.要有方法的重写3.父类引用指向子类对象 (对于父类中定义的方法,如果子类中重写了该方法,那么父类类型的引用将会调用子类中的这个方法,这就是动态连接) 对于多态,可以总结它为: 一、使用父类类型的引用指向子类的对象; 二、该引用只能调用父类中定义的方法和变量; 三、如果子类中重写了父类 阅读全文
posted @ 2017-12-09 13:18 GᎭ•Cristin 阅读(750) 评论(0) 推荐(0) 编辑
摘要: boolean exists() 判断文件或者目录是否存在 boolean isFile() 判断是否是文件 boolean isDirectory() 判断是否是目录 String getPath() 返回此对象表示的文件的相对路径名 String getAbsolutePath() 返回此对象表 阅读全文
posted @ 2017-12-07 13:28 GᎭ•Cristin 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 最近刚刚开始学java, 在框架搭建的过程中, 遭遇了诸多的坑, 和各种各样的不解与困惑, 由于没有什么java的相关基础, 看到各种xml的配置文件, 当真是一个头两个大. 并且并不知道那个配置到底在哪一步需要添加, 具体的东西, 网上教程一堆, 目前最流行的就是SSM框架, 但是所有人都是给出了 阅读全文
posted @ 2017-11-28 16:52 GᎭ•Cristin 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 需求表均同springmvc案例 此处只是使用maven 注意,以下所有需要建立在你的eclipse等已经集成配置好了maven了,说白了就是新建项目的时候已经可以找到maven了 没有的话需要安装maven 1.新建maven项目,如果不在上面,请到other里面去找一下 2,进入maven项目之 阅读全文
posted @ 2017-11-27 13:43 GᎭ•Cristin 阅读(440) 评论(0) 推荐(0) 编辑
摘要: int[] object[] 数组的长度是固定的,而集合的长度是可变的 数组只能通过数组下标去访问,且下标数据类型固定,只能是整型,很多情况下我们不知道数组元素的具体位置,因此只能一个个遍历去查找,这种情况当数组很庞大的时候程序非常耗时。而有的集合可以通过任意类型的关键字查找所映射的具体对象。集合自 阅读全文
posted @ 2017-11-23 11:29 GᎭ•Cristin 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 字符串查找 String提供了两种查找字符串的方法,即indexOf与lastIndexOf方法。 1、indexOf(String s) 该方法用于返回参数字符串s在指定字符串中首次出现的索引位置,当调用字符串的indexOf()方法时,会从当前字符串的开始位置搜索s的位置;如果没有检索到字符串s 阅读全文
posted @ 2017-11-22 20:27 GᎭ•Cristin 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 目的就是满足复杂软件工程的代码耦合、方法服用的问题 1、抽象类可以包含具体的方法,接口的所有方法都是抽象的,不能被具体实现。 接口是祖上有个理想,但没有实现,抽象可以实现部分(软件设计角度,相同的抽象出去) 2、一个类可以实现多个接口,但却只能继承最多一个抽象类。 3、接口的方法都是public的, 阅读全文
posted @ 2017-11-21 20:20 GᎭ•Cristin 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1. http://ask.testfan.cn/article/902 Appium 服务端安装-windows2. http://ask.testfan.cn/article/1078 最新版本appium desktop版本安装使用(支持简单录制)3. http://ask.testfan.c 阅读全文
posted @ 2017-11-20 14:18 GᎭ•Cristin 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 默认单选 1 在Java中,下面对于构造函数的描述正确的是()。 A) 类必须显示定义构造函数 B) 构造函数的返回类型是void C) 构造函数和类有相同的名称,并且不能带任何参数 D) 一个类可以定义多个构造函数 2. 以下属于面向对象的特征的是( )。(两项) A) 重载 B) 重写 C) 封 阅读全文
posted @ 2017-11-19 14:14 GᎭ•Cristin 阅读(393) 评论(0) 推荐(0) 编辑
摘要: bogon:Appium cristin$ cd gitbat bogon:gitbat cristin$ git clone https://github.com/CristinYXL/CristinAppium.git Cloning into 'CristinAppium'... warnin 阅读全文
posted @ 2017-11-16 14:27 GᎭ•Cristin 阅读(186) 评论(0) 推荐(0) 编辑
摘要: <!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper --><dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelp 阅读全文
posted @ 2017-11-12 14:19 GᎭ•Cristin 阅读(107) 评论(0) 推荐(0) 编辑
摘要: <!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core --><dependency> <groupId>org.mybatis.generator</groupId> <artifac 阅读全文
posted @ 2017-11-12 14:18 GᎭ•Cristin 阅读(124) 评论(0) 推荐(0) 编辑
摘要: <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --><dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3 阅读全文
posted @ 2017-11-12 14:16 GᎭ•Cristin 阅读(326) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> <scope>test</scope> </de 阅读全文
posted @ 2017-11-12 14:15 GᎭ•Cristin 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.6.5</version> </dependency> <dependenc 阅读全文
posted @ 2017-11-12 14:13 GᎭ•Cristin 阅读(257) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope></dependency> 阅读全文
posted @ 2017-11-12 14:12 GᎭ•Cristin 阅读(132) 评论(0) 推荐(0) 编辑
摘要: <!-- https://mvnrepository.com/artifact/log4j/log4j --><dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version>< 阅读全文
posted @ 2017-11-12 14:10 GᎭ•Cristin 阅读(585) 评论(0) 推荐(0) 编辑
摘要: <!-- https://mvnrepository.com/artifact/c3p0/c3p0 --> <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> <version>0.9.1.2</version> </ 阅读全文
posted @ 2017-11-12 14:09 GᎭ•Cristin 阅读(544) 评论(0) 推荐(0) 编辑
摘要: <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.35</version> </dependency> <dependency> <groupId>mysq 阅读全文
posted @ 2017-11-12 14:08 GᎭ•Cristin 阅读(1126) 评论(0) 推荐(0) 编辑
摘要: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/P 阅读全文
posted @ 2017-11-12 14:07 GᎭ•Cristin 阅读(254) 评论(0) 推荐(0) 编辑
摘要: JUnit 4和TestNG都是Java中非常受欢迎的单元测试框架。两种框架在功能上看起来非常相似。 哪一个更好? 在Java项目中应该使用哪个单元测试框架? 下面表中概括了JUnit 4和TestNG之间的功能比较。如下图所示 - 1. 注释支持 注释/注解支持在JUnit 4和TestNG中是非 阅读全文
posted @ 2017-11-12 11:17 GᎭ•Cristin 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 当页面打开时我们需要执行一些操作,这个时候如果我们选择使用jquery的话,需要重写他的3中方法,自我感觉没什么区 别,看个人喜好了,第二种感觉比较简单明了: 第一种: 复制代码代码如下: <script type="text/javascript" src="./js/jquery-1.7.min 阅读全文
posted @ 2017-11-02 16:14 GᎭ•Cristin 阅读(359) 评论(0) 推荐(0) 编辑
摘要: String[] strs = null;/* 1. ArrayUtils.isEmpty(strs) : 判断数组是否为空 , 不为空返回false,为空true */ArrayUtils.isEmpty( new String[]{"21", "是"} );//结果是falseArrayUtil 阅读全文
posted @ 2017-11-02 15:47 GᎭ•Cristin 阅读(510) 评论(0) 推荐(0) 编辑
摘要: package cn.springmvc.utils;import org.apache.commons.codec.digest.DigestUtils;import org.apache.commons.codec.digest.Md5Crypt;public class MD5CryptUti 阅读全文
posted @ 2017-11-02 15:33 GᎭ•Cristin 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 工具及背景: IntelliJ IDEA 2016.1.3 Ultimate。spring boot, maven项目,利用mybatis 注解的方式查询mysql。 业务逻辑关系:controller --> Service接口 > serverImpl >Dao -->DaoImpl > map 阅读全文
posted @ 2017-11-02 13:33 GᎭ•Cristin 阅读(6733) 评论(0) 推荐(0) 编辑
摘要: Result Maps collection already contains value for xyx.dsw.dao.mapper.admin.quotationwish.TempTestTableMapper.TempTestTableResult 一 错误信息: [html] view p 阅读全文
posted @ 2017-11-02 13:26 GᎭ•Cristin 阅读(21380) 评论(1) 推荐(2) 编辑
摘要: web.xml中webAppRootKey 1、 web.xml配置 <context-param><param-name>webAppRootKey</param-name><param-value>webapp.root</param-value></context-param>"webapp. 阅读全文
posted @ 2017-11-01 15:05 GᎭ•Cristin 阅读(291) 评论(0) 推荐(0) 编辑
摘要: <!-- generatorConfig.xml配置,其中:<plugin type="org.mybatis.generator.plugins.ToStringPlugin" /> 可以直接将list返回值展示出来,而非地址--> <?xml version="1.0" encoding="UT 阅读全文
posted @ 2017-10-30 20:03 GᎭ•Cristin 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 1、Callable<返回值类型> 阅读全文
posted @ 2017-10-29 12:15 GᎭ•Cristin 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1、数据库自身机制:隔离 2、程序级别的锁 3、业务层面:白天跑一遍,晚上做一遍数据检查 阅读全文
posted @ 2017-10-29 10:48 GᎭ•Cristin 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1、什么是事务 事务必须服从ACID原则。ACID指的是原子性(atomicity)、一致性(consistency)、隔离性(isolation)和持久性(durability)。 2、事务的四大特性 原子性:操作这些指令时,要么全部执行成功,要么全部不执行。只要其中一个指令执行失败,所有的指令都 阅读全文
posted @ 2017-10-29 10:12 GᎭ•Cristin 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 工程搭建 • 1依赖包 • 2配置文件 • 2.1spring-mybatis.xml • 2.2mybatis-config.xml自带配置文件 • 2.3 mapper(dao)对象 • 2.4 model 对象(pojo 数据库对象) • 2.5 mapper.xml 每次出新表的时候,都要重 阅读全文
posted @ 2017-10-28 15:48 GᎭ•Cristin 阅读(121) 评论(0) 推荐(0) 编辑