Skip to content

创建pull #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5f1351a
文件介绍
chenhaoxiang Aug 21, 2016
37f4b7e
Tomcat7.0版本
chenhaoxiang Aug 22, 2016
a2fe0e8
网站注册,通过邮箱激活实例
chenhaoxiang Aug 22, 2016
83f0fec
网站注册,发送邮箱激活实例
chenhaoxiang Aug 22, 2016
e0c9af3
log4j的jar包
chenhaoxiang Aug 22, 2016
a5d7de3
log4j的使用实例
chenhaoxiang Aug 23, 2016
101815e
自己写的一个BeanUtils-代码方法详解
chenhaoxiang Aug 25, 2016
afb411b
【BeanUtils】自己写的一个BeanUtils-代码方法详解
chenhaoxiang Aug 25, 2016
a3bb5f2
【框架】[Hibernate]构架知识点详细解析与测试实例
chenhaoxiang Aug 27, 2016
def670a
【框架】[Hibernate]构架知识点详解入门与测试实例
chenhaoxiang Aug 27, 2016
7656800
利用Hibernate进行单表的增删改查
chenhaoxiang Aug 30, 2016
eadd0a9
利用Hibernate进行单表的增删改查
chenhaoxiang Aug 30, 2016
b7de4df
利用Hibernate进行一对多的级联操作-Web实例
chenhaoxiang Aug 30, 2016
8dcb6d1
Spring框架
chenhaoxiang Aug 31, 2016
008ae90
【框架】[Spring3]下载安装、开源框架与IoC控制反转详解
chenhaoxiang Aug 31, 2016
61555ab
Spring-AOP切面技术
chenhaoxiang Sep 2, 2016
785e47b
AOP拦截-使用切点:AspectJExpressionPointcut-切点语言
chenhaoxiang Sep 3, 2016
a134dbb
基于Spring框架的Web应用演示(附带cglib工具进行动态代理)
chenhaoxiang Sep 4, 2016
e251ac5
UltraISO
chenhaoxiang Sep 13, 2016
aa10c73
SpringBoot1.3.1书中实例
chenhaoxiang Nov 4, 2016
adb1dff
Spring基础-依赖注入和Java配置
chenhaoxiang Nov 9, 2016
700d195
csdn博客
chenhaoxiang Nov 9, 2016
b3aa0a2
增加了一些注释
chenhaoxiang Nov 9, 2016
b729dbf
Spring基础配置-AOP
chenhaoxiang Nov 9, 2016
059839f
Spring基础配置-AOP
chenhaoxiang Nov 9, 2016
73b8f13
【Spring】Spring常用配置-Bean的Scope
chenhaoxiang Nov 11, 2016
0742845
【Spring】Spring常用配置-Spring EL和资源调用
chenhaoxiang Nov 14, 2016
6bdc1dc
【Spring】Spring常用配置-Bean的初始化和销毁(生命周期)
chenhaoxiang Nov 14, 2016
2ccb6cc
【Spring】Spring常用配置-Profile
chenhaoxiang Nov 14, 2016
ababaef
【Spring】Spring常用配置-事件(Application Event)
chenhaoxiang Nov 15, 2016
7ee5bec
【Spring】Spring常用配置-事件(Application Event)
chenhaoxiang Nov 15, 2016
60661bc
【Spring】Spring高级话题-Spring Aware
chenhaoxiang Nov 16, 2016
9bb6b5c
【Spring】Spring高级话题-Spring Aware
chenhaoxiang Nov 16, 2016
4b7ed50
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang Nov 18, 2016
70d7f3b
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang Nov 18, 2016
5978331
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang Nov 18, 2016
9e45863
Signed-off-by: chx <[email protected]>
chenhaoxiang Nov 27, 2016
82ecc5f
一个小小的vbs代码
chenhaoxiang Nov 27, 2016
b5e3cb1
vbs
chenhaoxiang Nov 27, 2016
c6861da
vbs
chenhaoxiang Nov 27, 2016
884197f
锁机的badusb代码
chenhaoxiang Nov 29, 2016
fb6980d
【Spring】Spring高级话题-条件注解-@Condition
chenhaoxiang Dec 7, 2016
5169cf6
【Spring】Spring高级话题-组合注解与元注解
chenhaoxiang Dec 8, 2016
085b5f8
【Spring】Spring高级话题-组合注解与元注解
chenhaoxiang Dec 8, 2016
7d630f0
【Spring】Spring高级话题-计划任务-@EnableScheduling
chenhaoxiang Dec 9, 2016
b5c6e0f
spring-测试
chenhaoxiang Dec 9, 2016
1187b15
spring--测试
chenhaoxiang Dec 9, 2016
d78ae7a
spring-测试
chenhaoxiang Dec 10, 2016
2016c97
【Spring】Spring高级话题-测试Spring项目
chenhaoxiang Dec 10, 2016
d0fd2f6
spring-Mvc
chenhaoxiang Dec 15, 2016
d1eaed5
QQ发说说,点击查看全文,自动添加好友
chenhaoxiang Dec 15, 2016
b41b689
QQ发说说,点击查看全文添加好友-源码
chenhaoxiang Dec 15, 2016
0620983
【SpringMVC】SpringMVC基础-SpringMVC项目快速搭建
chenhaoxiang Dec 19, 2016
8ba423f
说明
chenhaoxiang Dec 19, 2016
92b5e53
SpringMVC
chenhaoxiang Dec 19, 2016
457da39
改了一下springMVC,移动到springMVC了
chenhaoxiang Feb 20, 2017
402665d
修改了book项目,以及增加了一个小的项目-水平分表的解释小实践
chenhaoxiang Feb 5, 2018
7bacc16
修改book项目的说明文档编码
chenhaoxiang Feb 5, 2018
27218fe
修改说明文档编码
chenhaoxiang Feb 5, 2018
c35d76f
【MySQL性能优化】MySQL分库分表与水平分割取模案例
chenhaoxiang Feb 5, 2018
58b4f04
修改一下说明文档的编码
chenhaoxiang Feb 5, 2018
f7244f2
修改一下说明文档的编码
chenhaoxiang Feb 5, 2018
9be436e
【Druid】Druid监控SSM项目性能-配置与实例
chenhaoxiang Feb 6, 2018
d5f1ade
druid_spring_config项目sql
chenhaoxiang Feb 6, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions Hibernate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Hibernate的一些知识点与实例:

myHibWebDemo:[Hibernate]构架知识点详细解析
知识点详解,加上一个测试实例!

















9 changes: 9 additions & 0 deletions Hibernate/myHibWeb/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_6_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
</classpath>
13 changes: 13 additions & 0 deletions Hibernate/myHibWeb/.mymetadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-module
type="WEB"
name="myHibWeb"
id="myeclipse.1472453899091"
context-root="/myHibWeb"
j2ee-spec="6.0"
archive="myHibWeb.war">
<attributes>
<attribute name="webrootdir" value="WebRoot" />
</attributes>
</project-module>

58 changes: 58 additions & 0 deletions Hibernate/myHibWeb/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>myHibWeb</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>com.genuitec.eclipse.j2eedt.core.webnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
</projectDescription>
12 changes: 12 additions & 0 deletions Hibernate/myHibWeb/.settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebRoot"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
8 changes: 8 additions & 0 deletions Hibernate/myHibWeb/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#Mon Aug 29 14:58:21 CST 2016
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
9 changes: 9 additions & 0 deletions Hibernate/myHibWeb/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="myHibWeb">
<wb-resource deploy-path="/" source-path="/WebRoot"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="/myHibWeb"/>
<property name="java-output-path" value="/myHibWeb/WebRoot/WEB-INF/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
1 change: 1 addition & 0 deletions Hibernate/myHibWeb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
利用Hibernate进行单表的增删改查
3 changes: 3 additions & 0 deletions Hibernate/myHibWeb/WebRoot/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="cn.hncu.domain">

<!--name指的是POJO类的类名,table是数据库的表名,catalog是数据库的名称 -->
<class name="Student" table="students" catalog="hib">
<!--id表示此字段为数据库的主键,这里也可以用property来写,name为Student类的成员变量名,type为类型的包全名 -->
<id name="sId" type="java.lang.String">
<!--column表示映射的数据库的字段,name表示数据库中字段名,length表示varchar/char型的长度 -->
<column name="sId" length="8"></column>
<generator class="assigned"></generator>
</id>
<property name="sName" type="java.lang.String">
<column name="sName" length="40" />
</property>
<property name="sAge" type="java.lang.Integer">
<column name="sAge" />
</property>
<property name="deptId" type="java.lang.String">
<column name="deptId" length="8" />
</property>
</class>

</hibernate-mapping>
Binary file not shown.
Binary file not shown.
46 changes: 46 additions & 0 deletions Hibernate/myHibWeb/WebRoot/WEB-INF/classes/hibernate.cfg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<!-- 这是最简单的配置版!!! -->
<session-factory>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="connection.url">
jdbc:mysql://127.0.0.1:3306/hib
</property>
<property name="connection.username">root</property>
<property name="connection.password">1234</property>

<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>

<!--是否在后台显示Hibernate用到的SQL语句,开发时设置为true,便于查错,
程序运行时可以在Eclipse的控制台显示Hibernate的执行Sql语句。
项目部署后可以设置为false,提高运行效率-->
<property name="hibernate.show_sql">true </property>

<!--jdbc.fetch_size是指Hibernate每次从数据库中取出并放到JDBC的Statement中的记录条数。
Fetch Size设的越大,读数据库的次数越少,速度越快,Fetch Size越小,读数据库的次数越多,速度越慢-->
<property name="jdbc.fetch_size">50 </property>

<!--jdbc.batch_size是指Hibernate批量插入,删除和更新时每次操作的记录数。
Batch Size越大,批量操作的向数据库发送Sql的次数越少,速度就越快,同样耗用内存就越大-->
<property name="jdbc.batch_size">23 </property>

<!--jdbc.use_scrollable_resultset是否允许Hibernate用JDBC的可滚动的结果集。
对分页的结果集。对分页时的设置非常有帮助-->
<property name="jdbc.use_scrollable_resultset">false </property>

<!--connection.useUnicode连接数据库时是否使用Unicode编码 -->
<property name="connection.useUnicode">true</property>
<!--connection.characterEncoding连接数据库时数据的传输字符集编码方式 -->
<property name="connection.characterEncoding">utf-8</property>

<mapping resource="cn/hncu/domain/Student.hbm.xml" />
</session-factory>

</hibernate-configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions Hibernate/myHibWeb/WebRoot/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name></display-name>

<servlet>
<servlet-name>DemoServlet</servlet-name>
<servlet-class>cn.hncu.demo.DemoServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>DemoServlet</servlet-name>
<url-pattern>/DemoServlet</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
13 changes: 13 additions & 0 deletions Hibernate/myHibWeb/WebRoot/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>利用Hibernate进行单表的增删改查</title>
</head>

<body>
<jsp:forward page="/DemoServlet"></jsp:forward>
</body>
</html>
65 changes: 65 additions & 0 deletions Hibernate/myHibWeb/WebRoot/js/ajax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
String.prototype.trim=function(){
var p = /^\s*/;
//\s 匹配任何空白字符,包括空格、制表符、换页符等等
var str = this.replace(p, "");
p=/\s*$/;
str = str.replace(p, "");
return str;
};

function Ajax(){
var xmlhttp;
//1 创建一个ajax对象
if(window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}else{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
//url为请求的链接或文件。
//succ是status返回为200后运行的函数。
//failure是status返回不为200后运行的函数。

this.get=function(url,succ,failure){
//2 设置通讯方式和地址
xmlhttp.open("GET", url, true);//异步--多线程
//3 设置访问成功后的 js对象(回调函数)
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){//服务器的响应消息接收完毕
if(xmlhttp.status==200){//服务器正常响应
var txt = xmlhttp.responseText;//后台的响应信息
succ(txt);
}else{
if(failure){
failure(xmlhttp.status);
}
}
}
};
//4发送---Get方式,没有参数(请求体) ---数据在请求地址中
xmlhttp.send();
};

this.post= function(url,data,succ, failure){
//2 设置通讯方式和地址
xmlhttp.open("POST",url,true);//异步--多线程
//3 设置访问成功后的 js对象(回调函数)
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4){//服务器的响应消息接收完毕
if(xmlhttp.status==200){//服务器正常响应
var txt = xmlhttp.responseText;//后台的响应信息
succ(txt);
}else{
if(failure){
failure(xmlhttp.status);
}
}
}
};
//4设置请求头
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

//5发送---Post方式,有参数(请求体) <---数据 ※
xmlhttp.send(data);
};

}
Loading