整理一下从前写的SSH框架的例子,供新人学习,使用到了注解的方式.

  链接:https://pan.baidu.com/s/16i5dDIoDi4gOMsZfPvz6eg
  提取码:pjqa

  对新同学的建议:最好的学习方法是自己手动敲一遍,切不可看过别人写的,就觉得自己会做了

使用方式

  1、首先将项目mywork3.rar解压,导入到myeclipse中,注意修改applicationContext.xml 中用户名、密码,jdk使用1.6以上的就可以。

  解压后其目录结构如下:

  2、在mysql中新建数据库mydb

  3、导入SQL文件 user.sql

  4、启动项目,输入http://localhost:8080/mywork3/ 即可打开页面

源码备份

web.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- 用来定位Spring XML文件的上下文位置 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<!-- spring监听 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 过滤器将 Hibernate Session 绑定到请求线程中,它将自动被 Spring 的事务管理器探测到 -->
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<init-param>
<param-name>singleSession</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

applicationContext.xml

 <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <!-- 用注解方法注入bean 上边schemaLocation的三条语句顺序很重要,否则报错 -->
<context:annotation-config />
<context:component-scan base-package="com" /> <!-- 数据库连接池 -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/mydb?useUnicode=true&amp;characterEncoding=UTF-8" />
<property name="username" value="root" />
<property name="password" value="123456" />
</bean> <!-- 配置sessionFactory ,数据库配置在hibernate.cfg.xml中-->
<!--LocalSessionFactoryBean 加载bean方式 <mapping resource="com/model/User.hbm.xml"/>
AnnotationSessionFactoryBean 加载bean方式 <mapping class="com.model.User"/> ,它主要功能是取消了hbm.xml文件
-->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 配置实体描述文件 -->
<property name="mappingResources">
<list>
<value>com/model/User.hbm.xml</value>
</list>
</property>
<!--扫描com.cuangwu包下以及子包种有 @Service @Controller @Repository @Component 注解的类,一旦发现,则将其纳入到spring容器中管理
此spring.jar必须是 Spring2.5以上版本的,因为,Spring2.5之前org.springframework.orm.hibernate3.LocalSessionFactoryBean类中,
并没有 packageToScan 这个属性,只有mappingResuorces这个属性。而packageToScan这个属性正是映射包中的类,而mappingResuorces只是映射某个文件。-->
<!-- <property name="packagesToScan" > <list> <value>com.model</value>
</list> </property> -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbn2dd1.auto">update</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
</props>
</property>
</bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory" />
</bean> <!-- 配置事务管理器 -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="find*" read-only="true" />
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="delete*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<!-- aop代理设置-->
<aop:config>
<aop:pointcut expression="execution(public * com.service..*.*(..))"
id="myPointcut" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="myPointcut" />
</aop:config>
</beans>

struts.xml

 <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.i18n.encoding" value="UTF-8" />
<package name="struts2" extends="struts-default" namespace="/">
<!-- 配置action当与spring整合,class=bean的名称(如果bean没有指定value,则首写字母要小写)) -->
<action name="add" class="userAction" method="addUser" >
<result name="success">success.jsp</result>
<result name="error">fail.jsp</result>
</action>
<action name="query" class="userAction" method="queryUser">
<result name="success">index.jsp</result>
</action>
<action name="delete" class="userAction" method="deleteUser">
<result name="success">success.jsp</result>
<result name="error">fail.jsp</result>
</action>
<action name="edit" class="userAction" method="editUser">
<result name="editUser">editUser.jsp</result>
<result name="success">success.jsp</result>
</action>
</package>
</struts>

com.action.UserAction.java

 package com.action;

 import java.util.List;
import javax.annotation.Resource; import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import com.model.User;
import com.opensymphony.xwork2.ActionSupport;
import com.service.UserService; @Component("userAction")
@Scope("prototype")
public class UserAction extends ActionSupport{
/**
*
*/
private static final long serialVersionUID = 1L;
@Autowired
private UserService userService; private User user; private String searchText; private List<User> users; public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public UserService getUserService() {
return userService;
}
@Resource
public void setUserService(UserService userService) {
this.userService = userService;
} public String addUser(){
if(userService.exits(user.getUsername())){
return ERROR;
}
userService.save(user);
return SUCCESS;
} public String queryUser(){
searchText = getParam("queryText");
users = userService.queryUsers(searchText);
return SUCCESS;
} public String editUser(){
try {
Integer param = Integer.parseInt(getParam("param"));
if(param == 0){
Integer id = Integer.parseInt(getParam("id"));
user = userService.getUser( id);
return "editUser";
}else if(param == 1){
userService.modifyUser(user);
}
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
} public String deleteUser(){
try {
Integer param = Integer.parseInt(getParam("id"));
userService.deleteUser(param);
} catch (Exception e) {
e.printStackTrace();
}
return queryUser() ;
}
public String getSearchText() {
return searchText;
}
public void setSearchText(String searchText) {
this.searchText = searchText;
}
protected String getParam(String key){
return ServletActionContext.getRequest().getParameter(key);
}
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users = users;
}
}

com.dao.UserDao.java

 package com.dao;

 import java.util.List;
import javax.annotation.Resource;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Component;
import com.model.User; @Component
public class UserDAO {
private HibernateTemplate hibernateTemplate; public HibernateTemplate getHibernateTemplate() {
return hibernateTemplate;
} @Resource
public void setHibernateTemplate(HibernateTemplate hibernateTemplate) {
this.hibernateTemplate = hibernateTemplate;
} public void save(User user){
hibernateTemplate.save(user);
}
public void update(User user){
hibernateTemplate.update(user);
}
public void delete(Integer id){
User user=getUser(id);
hibernateTemplate.delete(user);
}
public User getUser(Integer id){
return (User)this.hibernateTemplate.load(User.class,id);
}
public List<User> findByUsername(String username){
return (List<User>) hibernateTemplate.find("from User u where u.username = ?",username);
}
public List<User> queryByUsername(String username){
return (List<User>) hibernateTemplate.find("from User u where u.username like ?","%"+username+"%");
}
public List<User> findAllUsers(){
return this.getHibernateTemplate().find("from User order by id");
}
}

com.model.User.java

 package com.model;

 import java.io.Serializable;

 public class User implements Serializable{

     private static final long serialVersionUID = 1L;
/**
* 用户id
*/
private int id;
/**
* 用户名
*/
private String username;
/**
* 用户密码
*/
private String userpassword;
/**
* 用户信息
*/
private String usermessage;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getUserpassword() {
return userpassword;
}
public void setUserpassword(String userpassword) {
this.userpassword = userpassword;
}
public String getUsermessage() {
return usermessage;
}
public void setUsermessage(String usermessage) {
this.usermessage = usermessage;
}
public static long getSerialversionuid() {
return serialVersionUID;
} }

com.model.User.hbm.xml

 <?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>
<class name="com.model.User" table="user" catalog="mydb">
<id name="id" type="java.lang.Integer">
<column name="id" />
<generator class="assigned"></generator>
</id>
<property name="username" type="java.lang.String">
<column name="username" length="30" not-null="true" unique="true"/>
</property>
<property name="userpassword" type="java.lang.String">
<column name="userpassword" length="30" not-null="true" />
</property>
<property name="usermessage" type="java.lang.String">
<column name="usermessage" length="30" />
</property>
</class>
</hibernate-mapping>

com.service.UserService.java

 package com.service;
import java.util.List; import com.model.User; public interface UserService {
/**
* 判断用户是否存在
*/
public boolean exits(String username);
/**
* 保存用户
*/
public void save(User user);
/**
* 修改用户
*/
public void modifyUser(User user);
/**
* 删除用户
*/
public void deleteUser(Integer id);
/**
* 获取指定id用户
*/
public User getUser(Integer id);
/**
* 获取用户列表
*/
public List<User> queryUsers(String username);
}

com.service.UserServiceImp.java

 package com.service;

 import java.util.List;

 import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.dao.UserDAO;
import com.model.User; @Service("userService")
public class UserServiceImp implements UserService {
@Autowired
private UserDAO userDAO; @Override
public boolean exits(String username){
List<User> userList = userDAO.findByUsername(username);
if(userList.size()>0)
return true;
else
return false;
} @Override
public List<User> queryUsers(String username){
if(username == null || "".equals(username))
return userDAO.findAllUsers();
else return userDAO.queryByUsername(username);
} @Override
public User getUser(Integer id){
return userDAO.getUser(id);
} @Override
@Transactional
public void save(User user){
userDAO.save(user);
} @Override
@Transactional
public void modifyUser(User user){
userDAO.update(user);
} @Override
@Transactional
public void deleteUser(Integer id){
userDAO.delete(id);
}
}

com.util.HibernateUtil.java

 package com.util;

 import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration; public class HibernateUtil {
private static SessionFactory sf;
static{
SessionFactory sf = new Configuration().configure().buildSessionFactory();
}
}

editUser.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>SSH</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="SSH"> </head> <body>
编辑User
<form action="edit.action" method="get">
ID:<input type="text" name="user.id" value="${user.id}" readonly="readonly"><br/>
UserName:<input type="text" name="user.username" value="${user.username}"><br/>
UserPassword:<input type="password" name="user.userpassword" value="${user.userpassword}"><br/>
UserMessage:<input type="text" name="user.usermessage" value="${user.usermessage}"><br/>
<input type="hidden" name="param" value="1"/>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>

fail.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>fail</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="fail"> </head> <body>
<div style="red;">fail</div><br/>
UserName不能相同
<a href="query.action?queryText=">返回主页</a>
</body>
</html>

index.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>SSH</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="SSH"> </head> <body>
添加user,如果姓名没有冲突,那么就添加到数据库,如果姓名冲突了就不能添加,返回失败页面
<form action="add.action" method="get">
UserName:<input type="text" name="user.username"><br />
UserPassword:<input type="password" name="user.userpassword"><br />
UserMessage:<input type="text" name="user.usermessage"><br />
<input type="submit" value="提交"> <input type="reset"
value="重置">
</form>
根据姓名查询,若不输入,则查询全部
<form action="query.action" method="post">
UserName: <input type="text" name="queryText" value="${searchText }" />
<input type="submit" value="查询" />
</form> <table width="70%" border="1px" align="center" cellpadding="0"
cellspacing="0">
<thead>
<tr bgcolor="#ff0">
<th width="25%">编号</th>
<th width="25%">姓名</th>
<th width="25%">信息</th>
<th width="25%">操作</th>
</tr>
</thead>
<tbody>
<c:forEach var="user" items="${users }">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
<td>${user.usermessage}</td>
<td><a href="edit.action?param=0&id=${user.id}">编辑</a> <a
href="delete.action?id=${user.id}">删除</a></td>
</tr>
</c:forEach>
</tbody>
</table> </body>
</html>

success.jsp

 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"> <title>SSH</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="SSH"> </head> <body>
添加user,如果姓名没有冲突,那么就添加到数据库,如果姓名冲突了就不能添加,返回失败页面
<form action="add.action" method="get">
UserName:<input type="text" name="user.username"><br />
UserPassword:<input type="password" name="user.userpassword"><br />
UserMessage:<input type="text" name="user.usermessage"><br />
<input type="submit" value="提交"> <input type="reset"
value="重置">
</form>
根据姓名查询,若不输入,则查询全部
<form action="query.action" method="post">
UserName: <input type="text" name="queryText" value="${searchText }" />
<input type="submit" value="查询" />
</form> <table width="70%" border="1px" align="center" cellpadding="0"
cellspacing="0">
<thead>
<tr bgcolor="#ff0">
<th width="25%">编号</th>
<th width="25%">姓名</th>
<th width="25%">信息</th>
<th width="25%">操作</th>
</tr>
</thead>
<tbody>
<c:forEach var="user" items="${users }">
<tr>
<td>${user.id}</td>
<td>${user.username}</td>
<td>${user.usermessage}</td>
<td><a href="edit.action?param=0&id=${user.id}">编辑</a> <a
href="delete.action?id=${user.id}">删除</a></td>
</tr>
</c:forEach>
</tbody>
</table> </body>
</html>

原创文章,欢迎转载,转载请注明出处

我的SSH框架实例(附源码)的更多相关文章

  1. C#共享内存实例 附源码

    原文 C#共享内存实例 附源码 网上有C#共享内存类,不过功能太简单了,并且写内存每次都从开头写.故对此进行了改进,并做了个小例子,供需要的人参考. 主要改进点: 通过利用共享内存的一部分空间(以下称 ...

  2. 【Java】SSM框架整合 附源码

    前言 前面已经介绍Spring和Mybatis整合,而本篇介绍在IDEA下Spring.Spring MVC.Mybatis(SSM)三个框架的整合,在阅读本篇之前,建议大家先去了解一下Spring. ...

  3. 教你搭建SpringMVC框架( 附源码)

    一.项目目录结构 二.SpringMVC需要使用的jar包 commons-logging-1.2.jar junit-4.10.jar log4j-api-2.0.2.jar log4j-core- ...

  4. Android网络:HTTP之利用HttpURLConnection访问网页、获取网络图片实例 (附源码)

    http://blog.csdn.net/yanzi1225627/article/details/22222735 如前文所示的TCP局域网传送东西,除了对传输层的TCP/UDP支持良好外,Andr ...

  5. 教你搭建SpringSecurity3框架(附源码)

    源码下载地址:http://pan.baidu.com/s/1qWsgIg0 一.web.xml <?xml version="1.0" encoding="UTF ...

  6. MVC系列——MVC源码学习:打造自己的MVC框架(二:附源码)

    前言:上篇介绍了下 MVC5 的核心原理,整篇文章比较偏理论,所以相对比较枯燥.今天就来根据上篇的理论一步一步进行实践,通过自己写的一个简易MVC框架逐步理解,相信通过这一篇的实践,你会对MVC有一个 ...

  7. 业务类接口在TCP,HTTP,BLL模式下的实例 设计模式混搭 附源码一份

    业务类接口在TCP,HTTP,BLL模式下的实例 设计模式混搭 附源码一份 WinForm酒店管理软件--框架这篇随笔可以说是我写的最被大家争议的随笔,一度是支持和反对是一样的多.大家对我做的这个行业 ...

  8. Ext.NET 4.1 系统框架的搭建(后台) 附源码

    Ext.NET 4.1 系统框架的搭建(后台) 附源码 代码运行环境:.net 4.5  VS2013 (代码可直接编译运行) 预览图: 分析图: 上面系统的构建包括三块区域:North.West和C ...

  9. 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码]

    原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码] 开始,我们有了一系列的解决方案,我们将动手搭建新系统吧. 用 ...

  10. (转)干货|这篇TensorFlow实例教程文章告诉你GANs为何引爆机器学习?(附源码)

    干货|这篇TensorFlow实例教程文章告诉你GANs为何引爆机器学习?(附源码) 该博客来源自:https://mp.weixin.qq.com/s?__biz=MzA4NzE1NzYyMw==& ...

随机推荐

  1. ACM/ICPC 2018亚洲区预选赛北京赛站网络赛D-80 Days--------树状数组

    题意就是说1-N个城市为一个环,最开始你手里有C块钱,问从1->N这些城市中,选择任意一个,然后按照顺序绕环一圈,进入每个城市会有a[i]元钱,出来每个城市会有b[i]个城市,问是否能保证经过每 ...

  2. MySQL添加用户错误:ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value解决方法

    MySQL添加新用户时出现如下报错,如下图: 经过查资料了解到: mysql用户表的中某些字段不能为空,没有默认值,其实是操作错误,mysql添加用户是不能这样直接insert user表的. 改为以 ...

  3. 实时采集新加坡交易所A50指数

    http://www.investing.com/indices/ftse-china-a50 前段时间有人问我如何得到这个网页的实时指数变化,经过抓包发现该网站提供的指数实时变化是通过Websock ...

  4. rbac组件权限按钮,菜单,可拔插

      1.通用模板 overflow: auto; //在a和b模板中进行切换 a 模板 :左侧菜单跟随滚动条 b模板  左侧以及上不动 **** <!DOCTYPE html> <h ...

  5. 我的第一个Go web程序 纪念一下

    参考Go web编程,很简单的程序: 大致的步骤: 绑定ip和端口 绑定对应的处理器或者处理器函数,有下面两种选择,选择一种即可监听ip及端口 处理器: 定义一个struct结构体 然后让这个结构体实 ...

  6. Python中Celery 的基本用法以及Django 结合 Celery 的使用和实时监控进程

    celery是什么 1 celery是一个简单,灵活且可靠的,处理大量消息的分布式系统 2 专注于实时处理的异步任务队列 3 同时也支持任务调度 执行流程 Celery 基本使用 tasks.py i ...

  7. jquery操作复选框(checkbox)的一些小技巧总结

    1.获取单个checkbox选中项(三种写法) //第一种 $("input:checkbox:checked").val() //第二种 $("input:[type= ...

  8. Oracle 表空间的创建与管理

    Oracle数据库创建之后有一些默认的表空间随之被创建,查询数据字典 dba_data_files 可以得到数据库当前的所有表空间信息. select * from v$tablespace; sel ...

  9. C++类的内存结构

    摘自Jerry19880126 简单类 class Base { int a; int b; public: void CommonFunction(); }; 简单类继承 class Derived ...

  10. Vue 中提示报错 handlers[i].call is not a function解决方法

    Vue 中提示警告 TypeError: handlers[i].call is not a function at callHook (vue.esm.js?a026:2921) at Object ...