//count1行
//count列
for(int i=0;icount1;i++){
for(int j=0;jcount;j++){
Cell c00 = rs.getCell(j, i);
String strc00 = c00.getContents();
//获取第一行 , 第二列的值
Cell c10 = rs.getCell(1, 0);
String strc10 = c10.getContents();
System.out.println(strc00);
System.out.println(strc10);
}
}
}catch(Exception e){
e.printStackTrace();
}
}
public static void main(String[]args){
Util u=new Util();
}
}
?xml version='1.0' encoding='utf-8'?
!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
""
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/test/property
property name="connection.username"
root/property
property name="connection.password"
daidai/property
!-- SQL dialect 数据库方言--
property name="dialect"
org.hibernate.dialect.MySQLDialect/property
!-- Echo all executed SQL to stdout --
property name="show_sql"true/property
property name="hbm2ddl.auto"create/property
mapping resource="User.hbm.xml"/
/session-factory
/hibernate-configuration
?xml version="1.0" encoding="utf-8"?
!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
""
hibernate-mapping package="com.daidai.entity"
class name="User" table="t_user"
id name="id"
generator class="native"/
/id
property name="name" type="java.lang.String" length="15"/
property name="Cellphone_Number" type="java.lang.String" length="11"/
property name="Cellphone_Number1" type="java.lang.String" length="11"/
property name="Cellphone_Number2" type="java.lang.String" length="11"/
property name="Fasten_Telephone" type="java.lang.String" length="11"/
property name="Fasten_Telephone2" type="java.lang.String" length="11"/
property name="remarks" type="java.lang.String"/
/class
/hibernate-mapping
package com.daidai.dao.impl;
import com.daidai.util.*;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import com.daidai.dao.UserDAO;
import com.daidai.entity.User;
public class UserDAOImpl implements UserDAO {
public Session session=null;
public void save(User user) {
try {
session=HibernateUtil.getSession();
session.getTransaction().begin();
session.save(user);
session.getTransaction().commit();
} catch (HibernateException e) {
session.getTransaction().rollback();
e.printStackTrace();
throw e;
}
}
}
package com.daidai.dao;
import com.daidai.entity.User;
public interface UserDAO {
public void save(User user);
}
【java包lang源代码 java lang包】java包lang源代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java lang包、java包lang源代码的信息别忘了在本站进行查找喔 。
推荐阅读
- 虚拟机主机装机,虚拟机装操作系统步骤
- 河南路由器怎么连接电脑,路由器连接电脑的网线怎么接
- 麒麟系统怎么清空u盘,麒麟系统怎么删除文件
- ios什么软件可以更改iccid,苹果修改iccid
- c语言补丁替换函数 c语言 替换
- pg数据库如何查看中文,pg数据库如何查看中文文献
- 什么水冷配什么cpu,水冷买什么价位的
- java素数代码优化 java素数程序
- 如何成为快手推广经理人,如何成为快手推广经理人呢