6、Spring+Struts2+MyBatis(mybatis有代理)整合增删改查
1、创建如下的oracle脚本
create table userinfo
(id number(4),
name varchar2(50),
password varchar2(20
telephone varchar2(15),
isadmin varchar2(5)); --4.2 用户表序列
create sequence seq_userinfo; alter table userinfo add constraint pk_userinfo_id primary key(id); insert into userinfo values(seq_userinfo.nextval,'holly','','134518024
','是'); commit;
userinfo.sql
2、创建如下项目结构
3、在项目的WebRoot下的WEB-INF下的lib下添加如下jar文件
aopalliance.jar
aspectjweaver.jar
cglib-nodep-2.1_3.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-logging-1.0.4.jar
freemarker-2.3.15.jar
log4j-1.2.8.jar
mybatis-3.2.3.jar
mybatis-spring-1.2.1.jar
ognl-2.7.3.jar
ojdbc14.jar
org.springframework.aop-3.0.2.RELEASE.jar
org.springframework.asm-3.0.2.RELEASE.jar
org.springframework.beans-3.0.2.RELEASE.jar
org.springframework.context-3.0.2.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.2.RELEASE.jar
org.springframework.jdbc-3.0.2.RELEASE.jar
org.springframework.orm-3.0.2.RELEASE.jar
org.springframework.transaction-3.0.2.RELEASE.jar
org.springframework.web-3.0.2.RELEASE.jar
struts2-core-2.1.8.1.jar
struts2-spring-plugin-2.1.8.1.jar
xwork-core-2.1.6.jar
4、在src下的com.bean包下创建UserInfo.java
package com.bean; public class UserInfo {
private Integer id;
private String name;
private String password;
private String telephone;
private String isadmin; public UserInfo() { }
public UserInfo(Integer id, String name, String password, String telephone,
String isadmin) {
this.id = id;
this.name = name;
this.password = password;
this.telephone = telephone;
this.isadmin = isadmin;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getIsadmin() {
return isadmin;
}
public void setIsadmin(String isadmin) {
this.isadmin = isadmin;
}
@Override
public String toString() {
return "UserInfo [id=" + id + ", isadmin=" + isadmin + ", name=" + name
+ ", password=" + password + ", telephone=" + telephone + "]";
} }
UserInfo.java
5、在src下的com.dao包下创建UserInfoDao.java
package com.dao; import java.util.List; import com.bean.UserInfo;
/**
* mybatis映射文件的dao接口
* @author pc
*
*/
public interface UserInfoDao {
public List<UserInfo> findAll(); //查所有
public UserInfo findUser(UserInfo user);//条件查询
public void insertUser(UserInfo user); //插入对象
public void updateUser(UserInfo user); //修改对象
public void deleteUser(int id); //条件删除 }
UserInfoDao.java
6、在src下的com.dao包下创建UserInfoDao.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.dao.UserInfoDao">
<select id="findAll" resultType="user">
select * from userinfo
</select>
<select id="findUser" resultType="user" parameterType="user">
select * from userinfo where name=#{name} and password=#{password}
</select>
<insert id="insertUser" parameterType="user">
insert into userinfo values(seq_userinfo.nextval,#{name},#{password},#{telephone},#{isadmin})
</insert>
<update id="updateUser" parameterType="user">
update userinfo set name=#{name},password=#{password},telephone=#{telephone},isadmin=#{isadmin} where id=#{id}
</update> <delete id="deleteUser" parameterType="int">
delete from userinfo where id=#{id}
</delete>
</mapper>
UserInfoDao.xml
7、在src下创建mybatis-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd" >
<configuration>
<!-- mybatis映射文件的别名配置 -->
<typeAliases>
<typeAlias type="com.bean.UserInfo" alias="user"/>
</typeAliases> <!-- 注册mybatis的映射文件 -->
<mappers>
<mapper resource="com/dao/UserInfoDao.xml"/>
</mappers>
</configuration>
mybatis-config.xml
8、在src下的com.dao.impl包下创建UserInfoDaoImpl.java
package com.dao.impl; import java.util.List; import org.mybatis.spring.SqlSessionTemplate; import com.bean.UserInfo;
import com.dao.UserInfoDao;
/**
* 数据dao接口实现类
* @author pc
*
*/
public class UserInfoDaoImpl implements UserInfoDao {
private SqlSessionTemplate sqlSession;
/**
* 根据id删除
*/
public void deleteUser(int id) {
//获取代理对象
UserInfoDao dao=sqlSession.getMapper(UserInfoDao.class);
try {
dao.deleteUser(id); //调用代理对象映射的dao接口删除
sqlSession.commit(); //提交事务
System.out.println("删除成功");
} catch (Exception e) {
System.out.println("删除失败");
e.printStackTrace();
}
}
/**
* 查询所有
*/
public List<UserInfo> findAll() {
//获取代理对象
UserInfoDao dao=sqlSession.getMapper(UserInfoDao.class);
List<UserInfo> list=null;
try {
list=dao.findAll();
System.out.println("查询所有成功");
} catch (Exception e) {
System.out.println("查询所有失败");
e.printStackTrace();
}
return list;
} /**
* 条件查询
*/
public UserInfo findUser(UserInfo user) {
//获取代理对象
UserInfoDao dao=sqlSession.getMapper(UserInfoDao.class);
UserInfo userinfo=null;
try {
if(user!=null){
userinfo=dao.findUser(user);
System.out.println("条件查询成功");
}else{
System.out.println("条件查询参数为空");
}
} catch (Exception e) {
System.out.println("条件查询失败");
e.printStackTrace();
}
return userinfo;
}
/**
*添加
*/
public void insertUser(UserInfo user) {
//获取代理对象
UserInfoDao dao=sqlSession.getMapper(UserInfoDao.class);
try {
if(user!=null){
dao.insertUser(user);
sqlSession.commit(); //提交事务
System.out.println("添加成功");
}else{
System.out.println("添加参数为空");
}
} catch (Exception e) {
System.out.println("添加失败");
e.printStackTrace();
} }
/**
* 修改对象
*/
public void updateUser(UserInfo user) {
//获取代理对象
UserInfoDao dao=sqlSession.getMapper(UserInfoDao.class);
try {
if(user!=null){
dao.updateUser(user);
sqlSession.commit(); //提交事务
System.out.println("修改成功");
}else{
System.out.println("修改参数为空");
}
} catch (Exception e) {
System.out.println("修改失败");
e.printStackTrace();
}
}
public SqlSessionTemplate getSqlSession() {
return sqlSession;
}
public void setSqlSession(SqlSessionTemplate sqlSession) {
this.sqlSession = sqlSession;
} }
UserInfoDaoImpl.java
9、在src下的com.service包下创建UserInfoService.java
package com.service; import java.util.List; import com.bean.UserInfo;
/**
* 服务接口
* @author pc
*
*/
public interface UserInfoService {
public List<UserInfo> findAll(); //查所有
public UserInfo findUser(UserInfo user);//条件查询
public void insertUser(UserInfo user); //插入对象
public void updateUser(UserInfo user); //修改对象
public void deleteUser(int id); //条件删除 }
UserInfoService.java
9、在src下的com.service.impl包下创建UserInfoServiceImpl.java
package com.service.impl; import java.util.List; import com.bean.UserInfo;
import com.dao.UserInfoDao;
import com.dao.impl.UserInfoDaoImpl;
import com.service.UserInfoService; public class UserInfoServiceImpl implements UserInfoService{
//引入数据层接口
UserInfoDao dao=new UserInfoDaoImpl();
/**
* 删除
*/
public void deleteUser(int id) {
dao.deleteUser(id);
}
/**
* 查所有
*/
public List<UserInfo> findAll() {
return dao.findAll();
}
/**
* 条件查询
*/
public UserInfo findUser(UserInfo user) {
return dao.findUser(user);
}
/**
* 插入对象
*/
public void insertUser(UserInfo user) {
dao.insertUser(user);
}
/**
* 修改对象
*/
public void updateUser(UserInfo user) {
dao.updateUser(user);
} public UserInfoDao getDao() {
return dao;
}
public void setDao(UserInfoDao dao) {
this.dao = dao;
} }
UserInfoServiceImpl.java
10、在src下的com.action包下创建UserInfoAction.java
package com.action; import com.bean.UserInfo;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.service.UserInfoService;
import com.service.impl.UserInfoServiceImpl;
/**
*
* @author pc
* ActionSupport可以最数据校验
*/
public class UserInfoAction extends ActionSupport { /**
* 引用服务层对象
*/
private UserInfoService service=new UserInfoServiceImpl();
/**
* 对象用于接收请求中的值
* 必须创建setter和getter方法,代理对象才能获取或设置
*/
private UserInfo user;
/**
* 登录
* @return
*/
public String login(){ if(user!=null){
System.out.println("登录表单值接收到");
UserInfo userinfo=service.findUser(user);
if(userinfo!=null){
System.out.println("登录陈宫");
return SUCCESS; }else{
return ERROR;
} }else{
System.out.println("登录表单值没有接收到");
return ERROR; }
} /**
* 注册
* @return
*/
public String register(){
if(user!=null){
System.out.println("注册表单值接收到");
service.insertUser(user);
System.out.println("action注册成功");
return SUCCESS; }else{
System.out.println("注册表单值没有接收到");
return ERROR; }
} public UserInfoService getService() {
return service;
} public void setService(UserInfoService service) {
this.service = service;
} public UserInfo getUser() {
return user;
} public void setUser(UserInfo user) {
this.user = user;
} }
UserInfoAction.java
11、在src下创建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" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
<!-- 1.配置数据源 -->
<bean id="oracleDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/>
<property name="username" value="scott"/>
<property name="password" value="tiger"/>
</bean> <!-- 3.事务管理session工厂 -->
<!-- 事务配置 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="oracleDataSource"/>
</bean> <!--2.在sqlSessionFactory中注入数据源 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 注入数据源 -->
<property name="dataSource" ref="oracleDataSource"/> <!-- 引用mybatis的主配置文件,(注册dao映射文件) -->
<property name="configLocation">
<value>classpath:mybatis-config.xml</value>
</property>
</bean> <!-- 3.用构造获取sqlSessionTemplate -->
<bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
<constructor-arg ref="sqlSessionFactory"/>
</bean> <!-- 4.dao注入sqlSesson -->
<bean id="userdao" class="com.dao.impl.UserInfoDaoImpl">
<property name="sqlSession" ref="sqlSessionTemplate"/>
</bean> <!-- 5.service注入dao -->
<bean id="servicedao" class="com.service.impl.UserInfoServiceImpl">
<property name="dao" ref="userdao"/>
</bean> <!-- 6.在Action中注入service -->
<bean id="userAction" class="com.action.UserInfoAction">
<property name="service" ref="servicedao"/>
</bean>
</beans>
applicationContext.xml
12、在src下创建struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "struts-2.1.dtd" >
<struts>
<!-- 中文乱码处理 -->
<constant name="struts.i18n.encoding" value="UTF-8"/> <package name="default" namespace="/" extends="struts-default"> <!-- method是对应action类的有返回值的方法名 -->
<!-- 登录,注册,通配符设置,动态调用方法,*表示Login或register -->
<action name="*" class="userAction" method="{1}">
<result name="input">{1}.jsp</result>
<result name="success">success.jsp</result>
<result name="error">error.jsp</result>
</action> </package>
</struts>
struts.xml
13、编辑WebRoot下的WEB-INF下的web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<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> <welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list> </web-app>
web.xml
14、在WebRoot下创建register.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>My JSP 'index.jsp' starting page</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="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body>
<center>
<fieldset style="width:400px;">
<legend>注册</legend>
<form action="registerUser.action" method="post">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="user.name"/></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="user.password"/></td>
</tr>
<tr>
<td>电话号码:</td>
<td><input type="text" name="user.telephone"/></td>
</tr>
<tr>
<td>是否是管理员:</td>
<td>
<input type="radio" name="user.isadmin" value="是">
<input type="radio" name="user.isadmin" value="否" checked="checked"/>
</td>
</tr>
<tr>
<td><input type="submit" value="提交"/></td>
<td><input type="reset" value="重置"/></td>
</tr>
</table> </form>
</fieldset>
</center>
</body>
</html>
register.jsp
15、在WebRoot下创建login.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>My JSP 'index.jsp' starting page</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="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body>
<center>
<fieldset style="width:400px;">
<legend>登录</legend>
<form action="login.action" method="post">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" name="user.name"/></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="user.password"/></td>
</tr>
<tr>
<td><input type="submit" value="提交"/></td>
<td><input type="reset" value="重置"/></td>
</tr>
</table> </form>
</fieldset>
</center>
</body>
</html>
login.jsp
16、在WebRoot下创建success.jsp
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
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>My JSP 'index.jsp' starting page</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="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body>
<h1>操作成功</h1>
<s:if test="user.name eq 'holly'">
holly你来啦?
</s:if>
<s:else>
我不认识你?你是谁?
</s:else>
</body>
</html>
success.jsp
17、在WebRoot下创建error.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>My JSP 'index.jsp' starting page</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="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head> <body>
操作失败!
</body>
</html>
error.jsp
18、运行
<%@ 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>My JSP 'index.jsp' starting page</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="This is my page"><!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head> <body> <center> <fieldset style="width:400px;"> <legend>注册</legend> <form action="registerUser.action" method="post"> <table> <tr> <td>用户名:</td> <td><input type="text" name="user.name"/></td> </tr> <tr> <td>密码:</td> <td><input type="password" name="user.password"/></td> </tr> <tr> <td>电话号码:</td> <td><input type="text" name="user.telephone"/></td> </tr> <tr> <td>是否是管理员:</td> <td> <input type="radio" name="user.isadmin" value="是"> <input type="radio" name="user.isadmin" value="否" checked="checked"/> </td> </tr> <tr> <td><input type="submit" value="提交"/></td> <td><input type="reset" value="重置"/></td> </tr> </table> </form> </fieldset> </center> </body></html>
6、Spring+Struts2+MyBatis(mybatis有代理)整合增删改查的更多相关文章
- SpringBoot+Mybatis+Maven+MySQL逆向工程实现增删改查
SpringBoot+Mybatis+MySQL+MAVEN逆向工程实现增删改查 这两天简单学习了下SpringBoot,发现这玩意配置起来是真的方便,相比于SpringMVC+Spring的配置简直 ...
- 小D课堂-SpringBoot 2.x微信支付在线教育网站项目实战_3-2.使用Mybatis注解开发视频列表增删改查
笔记 2.使用Mybatis注解开发视频列表增删改查 讲解:使用Mybatis3.x注解方式 增删改查实操, 控制台打印sql语句 1.控制台打印sql语句 ...
- SSMybatis整合 --详细解读Mybatis对oracle数据库进行增删改查(一)
Mybatis是现在主流的持久化层框架,与Hibernate不同的是,它鼓励程序员使用原声SQL语句对数据库进行操作.因此提供了非常灵活的功能.特别是当数据库同时访问数过多,需要进行优化时,使用sql ...
- Mybatis之基于XML的增删改查
这里先吐槽下,写的半天的东西,IE浏览器弹出调试窗口导致写的东西全部没保存,搞得我还要重新用谷歌写,思路全没了,fuck. 前面学习了下spring的DAO层,说起DAO层,那ORM肯定是少不了的,O ...
- MyBatis之二:简单增删改查
这一篇在上一篇的基础上简单讲解如何进行增删改查操作. 一.在mybatis的配置文件conf.xml中注册xml与注解映射 <!-- 注册映射文件 --> <mappers> ...
- mybatis学习(五)——增删改查及自增主键的获取
一.mybatis的增删改查 1.修改hotelMapper接口 package com.pjf.mybatis.dao; import com.pjf.mybatis.po.Hotel; publi ...
- mybatis:开发环境搭建--增删改查--多表联合查询(多对一)
什么是mybatisMyBatis是支持普通SQL查询,存储过程和高级映射的优秀持久层框架.MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及结果集的检索.MyBatis使用简单的XML或 ...
- MyBatis操作数据库(基本增删改查)
一.准备所需工具(jar包和数据库驱动) 网上搜索下载就可以 二.新建一个Java project 1.将下载好的包导入项目中,build path 2.编写MyBatis配置文件:主要填写prope ...
- 【Mybatis】mybatis开启Log4j日志、增删改查操作
Mybatis日志(最常用的Log4j) 官方网站http://www.mybatis.org/mybatis-3/zh/logging.html 1.在src目录下创建一个log4j.propert ...
- Mybatis入门(二)------增删改查
Mybatis增删改查基本操作 一.XML实现方式 1.mapper.xml的配置 <?xml version="1.0" encoding="UTF-8" ...
随机推荐
- CentOS6.5 部署VPN管理系统(StrongSwan+iKEv2+Freeradiu+Mysql+Daloradius)
一.环境介绍 Server IP:192.168.30.133 System: CentOS 6.5 Client:Winodows 二.编译安装StrongSwan 1.下载StrongSwan w ...
- 数据集下载 MNIST
The Street View House Numbers (SVHN) Dataset SVHN is a real-world image dataset for developing machi ...
- 创建Properties文件
/** * 生成Properties文件 * @param map Properties文件的内容,键值对 * @param path Properties文件生成后存放的路径 * @param pr ...
- HDU 5904 LCIS
$dp$. 这题的突破口在于要求数字是连续的. 可以分别记录两个串以某个数字为结尾的最长上升长度,然后枚举一下以哪个数字为结尾就可以得到答案了. 因为$case$有点多,不能每次$memset$,额外 ...
- 解决mac-osx10.11下无法安装wxPython2.8-osx-unicode-2.8.12.1的问题
在mac-osx10.11版本下,安装RIDE前提需要装wxPython2.8-osx-unicode-2.8.12.1库,但在安装wxPython过程中,会提示安装失败,以下提供一种解决方案 这里我 ...
- Tomcat下的work目录
work目录只是tomcat的工作目录,也就是tomcat把jsp转换为class文件的工作目录,这也正是为什么它叫work目录而不是cache目录的原因. jsp,tomcat的工作原理是当浏览器访 ...
- Error(10028)
两个进程里都有同一个条件判断的话,会产生并行信号冲突的问题. 同一个信号不允许在多个进程中赋值,否则则为多驱动. 进程的并行性决定了多进程不同能对同一个对象进行赋值.
- Unity属性(Attributes)
Unity3d中的属性(Attributes) Attributes属性属于U3D的RunTimeClass,所以加上以下的命名空间是必须的了. using UnityEngine; using Sy ...
- tcp协议栈
TCP/IP是互联网的核心协议,也是大多数网络应用的核心协议.就前面一段时间面试中问到的TCP/IP问题,这里给出一个简单的小结. TCP由RFC793.RFC1122.RFC1323.RFC20 ...
- 2016 ACM Amman Collegiate Programming Contest D Rectangles
Rectangles time limit per test 5 seconds memory limit per test 256 megabytes input standard input ou ...