-
Notifications
You must be signed in to change notification settings - Fork 529
创建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
Closed
创建pull #2
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
5f1351a
文件介绍
chenhaoxiang 37f4b7e
Tomcat7.0版本
chenhaoxiang a2fe0e8
网站注册,通过邮箱激活实例
chenhaoxiang 83f0fec
网站注册,发送邮箱激活实例
chenhaoxiang e0c9af3
log4j的jar包
chenhaoxiang a5d7de3
log4j的使用实例
chenhaoxiang 101815e
自己写的一个BeanUtils-代码方法详解
chenhaoxiang afb411b
【BeanUtils】自己写的一个BeanUtils-代码方法详解
chenhaoxiang a3bb5f2
【框架】[Hibernate]构架知识点详细解析与测试实例
chenhaoxiang def670a
【框架】[Hibernate]构架知识点详解入门与测试实例
chenhaoxiang 7656800
利用Hibernate进行单表的增删改查
chenhaoxiang eadd0a9
利用Hibernate进行单表的增删改查
chenhaoxiang b7de4df
利用Hibernate进行一对多的级联操作-Web实例
chenhaoxiang 8dcb6d1
Spring框架
chenhaoxiang 008ae90
【框架】[Spring3]下载安装、开源框架与IoC控制反转详解
chenhaoxiang 61555ab
Spring-AOP切面技术
chenhaoxiang 785e47b
AOP拦截-使用切点:AspectJExpressionPointcut-切点语言
chenhaoxiang a134dbb
基于Spring框架的Web应用演示(附带cglib工具进行动态代理)
chenhaoxiang e251ac5
UltraISO
chenhaoxiang aa10c73
SpringBoot1.3.1书中实例
chenhaoxiang adb1dff
Spring基础-依赖注入和Java配置
chenhaoxiang 700d195
csdn博客
chenhaoxiang b3aa0a2
增加了一些注释
chenhaoxiang b729dbf
Spring基础配置-AOP
chenhaoxiang 059839f
Spring基础配置-AOP
chenhaoxiang 73b8f13
【Spring】Spring常用配置-Bean的Scope
chenhaoxiang 0742845
【Spring】Spring常用配置-Spring EL和资源调用
chenhaoxiang 6bdc1dc
【Spring】Spring常用配置-Bean的初始化和销毁(生命周期)
chenhaoxiang 2ccb6cc
【Spring】Spring常用配置-Profile
chenhaoxiang ababaef
【Spring】Spring常用配置-事件(Application Event)
chenhaoxiang 7ee5bec
【Spring】Spring常用配置-事件(Application Event)
chenhaoxiang 60661bc
【Spring】Spring高级话题-Spring Aware
chenhaoxiang 9bb6b5c
【Spring】Spring高级话题-Spring Aware
chenhaoxiang 4b7ed50
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang 70d7f3b
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang 5978331
【Spring】Spring高级话题-多线程-TaskExecutor
chenhaoxiang 9e45863
Signed-off-by: chx <chxpostbox@outlook.com>
chenhaoxiang 82ecc5f
一个小小的vbs代码
chenhaoxiang b5e3cb1
vbs
chenhaoxiang c6861da
vbs
chenhaoxiang 884197f
锁机的badusb代码
chenhaoxiang fb6980d
【Spring】Spring高级话题-条件注解-@Condition
chenhaoxiang 5169cf6
【Spring】Spring高级话题-组合注解与元注解
chenhaoxiang 085b5f8
【Spring】Spring高级话题-组合注解与元注解
chenhaoxiang 7d630f0
【Spring】Spring高级话题-计划任务-@EnableScheduling
chenhaoxiang b5c6e0f
spring-测试
chenhaoxiang 1187b15
spring--测试
chenhaoxiang d78ae7a
spring-测试
chenhaoxiang 2016c97
【Spring】Spring高级话题-测试Spring项目
chenhaoxiang d0fd2f6
spring-Mvc
chenhaoxiang d1eaed5
QQ发说说,点击查看全文,自动添加好友
chenhaoxiang b41b689
QQ发说说,点击查看全文添加好友-源码
chenhaoxiang 0620983
【SpringMVC】SpringMVC基础-SpringMVC项目快速搭建
chenhaoxiang 8ba423f
说明
chenhaoxiang 92b5e53
SpringMVC
chenhaoxiang 457da39
改了一下springMVC,移动到springMVC了
chenhaoxiang 402665d
修改了book项目,以及增加了一个小的项目-水平分表的解释小实践
chenhaoxiang 7bacc16
修改book项目的说明文档编码
chenhaoxiang 27218fe
修改说明文档编码
chenhaoxiang c35d76f
【MySQL性能优化】MySQL分库分表与水平分割取模案例
chenhaoxiang 58b4f04
修改一下说明文档的编码
chenhaoxiang f7244f2
修改一下说明文档的编码
chenhaoxiang 9be436e
【Druid】Druid监控SSM项目性能-配置与实例
chenhaoxiang d5f1ade
druid_spring_config项目sql
chenhaoxiang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
Hibernate/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
7 changes: 7 additions & 0 deletions
Hibernate/myHibWeb/.settings/org.eclipse.wst.common.project.facet.core.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
1 change: 1 addition & 0 deletions
Hibernate/myHibWeb/.settings/org.eclipse.wst.jsdt.ui.superType.container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
1 change: 1 addition & 0 deletions
Hibernate/myHibWeb/.settings/org.eclipse.wst.jsdt.ui.superType.name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Window |
1 change: 1 addition & 0 deletions
Hibernate/myHibWeb/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 added
Hibernate/myHibWeb/WebRoot/WEB-INF/classes/cn/hncu/domain/Student.class
Binary file not shown.
26 changes: 26 additions & 0 deletions
Hibernate/myHibWeb/WebRoot/WEB-INF/classes/cn/hncu/domain/Student.hbm.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/antlr-2.7.7.jar
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/classmate-1.3.0.jar
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar
Binary file not shown.
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/hibernate-core-5.1.1.Final.jar
Binary file not shown.
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/jandex-2.0.0.Final.jar
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/javassist-3.20.0-GA.jar
Binary file not shown.
Binary file added
Hibernate/myHibWeb/WebRoot/WEB-INF/lib/jboss-logging-3.3.0.Final.jar
Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions
Hibernate/myHibWeb/WebRoot/WEB-INF/web.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| }; | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.