当前位置: 首页 > news >正文

公司网站免费自建推广网站的方法有哪些

公司网站免费自建,推广网站的方法有哪些,建立网站用什么软件,网站怎么ftp一、构建Hibernate项目 1.新建Java项目HibernateDemo1 2.导入Hibernate下的jar包#xff08;lib-required下的所有jar包#xff09;jdbc驱动包 3.导入hibernate.cfg.xml文件到src目录下#xff08;在Hibernate文件目录中搜索*.cfg.xml#xff09; 配置该文件如下#… 一、构建Hibernate项目     1.新建Java项目HibernateDemo1     2.导入Hibernate下的jar包lib-required下的所有jar包jdbc驱动包     3.导入hibernate.cfg.xml文件到src目录下在Hibernate文件目录中搜索*.cfg.xml      配置该文件如下   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17         !DOCTYPE hibernate-configuration PUBLIC         -//Hibernate/Hibernate Configuration DTD 3.0//EN         http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd         hibernate-configuration         session-factory             property namehibernate.dialectorg.hibernate.dialect.MySQL5InnoDBDialect/property             property namehibernate.connection.driver_classcom.mysql.jdbc.Driver/property             property namehibernate.connection.urljdbc:mysql:///hibernate_db/property             property namehibernate.connection.usernameroot/property         property namehibernate.connection.passwordroot/property         property namehibernate.hbm2ddl.autoupdate/property         property namehibernate.show_sqltrue/property         property namehibernate.format_sqltrue/property         mapping resourcecom\eduask\pojo\Person.hbm.xml /         /session-factory         /hibernate-configuration      4.建立mysql数据库hibernate_db     5.在src目录下建两个包com.eduask.pojo、com.eduask.test       pojo包下建一个Person类(Person.java)内容如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 package com.eduask.pojo; import java.util.Date; public class Person {     private Integer id;     private String name;     private int password;     private Date birthday;           public Person() {}     public Person(String name, int password, Date birthday) {         super();         this.name  name;         this.password  password;         this.birthday  birthday;     }     Override     public String toString() {         return Person [id  id  , name  name  , password  password  , birthday  birthday  ];     }     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 int getPassword() {         return password;     }     public void setPassword(int password) {         this.password  password;     }     public Date getBirthday() {         return birthday;     }     public void setBirthday(Date birthday) {         this.birthday  birthday;     }             }     pojo包下引入xml文件Person.hbm.xml,Hibernate包中搜索修改内容如下 1 2 3 4 5 6 7 8 9 10 11 12 ?xml version1.0? !DOCTYPE hibernate-mapping SYSTEM http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd  hibernate-mapping     class namecom.eduask.pojo.Person tablet_person         id nameid             generator classnative/         /id         property namename columnt_name/property         property namepassword length6/property         property namebirthday/property     /class /hibernate-mapping     test包中新建测试类HibernateTest.java,内容如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 package com.eduask.test; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import com.eduask.pojo.Person; public class HibernateTest {     public static void main(String[] args) {         Configuration config  new Configuration().configure();         SessionFactory factory  config.buildSessionFactory();         Session session  factory.openSession();         Transaction tx  session.beginTransaction();         Person p  new Person(admin,123456,new java.util.Date());          Criteria c  session.createCriteria(Person.class);         ListPerson lists  c.list();         System.out.println(lists.get(0).getName());         tx.commit();         session.close();         factory.close();     } }     运行测试类,结果如下 Hibernate:      insert      into         t_person         (t_name, password, birthday)      values         (?, ?, ?) 八月 11, 2016 5:17:14 下午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop INFO: HHH000030: Cleaning up connection pool [jdbc:mysql:///hibernate_db] 同时在数据库中可以看到t_person表已被创建以及插入的响应数据。 本文转自yeleven 51CTO博客原文链接:http://blog.51cto.com/11317783/1836998
http://www.lebaoying.cn/news/39278.html

相关文章:

  • 网站使用条款模板263邮箱个人登录入口
  • 企业备案 网站服务内容miit网站备案
  • 数据显示网站模板网页平面设计作品
  • 中国建设银行网站上不去小程序平台商城
  • 简单网站建设合同模板广西网站制作
  • 知名企业文化某网站搜索引擎优化
  • 短视频素材网站免费大推荐wordpress js失效
  • 自己网站做短链接烟台公司网站定制
  • 做网站用python还是php模板网站和插件有哪些
  • 电子商务网站建设与维护03wordpress安装时需要填写的使用者
  • 在阿里云服务器做淘客网站贵阳市花溪区建设局网站
  • 做网站都需要什么软件企业宣传片
  • 做美瞳网站需要什么资质做智能网站软件
  • 上海网站设计哪家好广州高端网站设计
  • 文字网站居中快速网站模板公司
  • 做网站应下哪个软件卢松松网站怎么做
  • 欧洲网站设计公司注册流程
  • 东莞如何建设网站制作平台去掉wordpress.org
  • 微商城网站建设讯息手机网站建设服务器
  • 徐州做网站需要多少钱网站源码下载 app
  • 网站制作容易吗怎么样外贸产品网站建设
  • 杭州网站建设很 棒网站建设贰金手指下拉壹玖
  • h5响应式网站模板制作杭州品牌网站开发
  • 省级网站 开发建设 资质小红书怎么做关键词排名优化
  • 个人网站推荐东莞最新招聘信息今天
  • 佛山那里有做苗木销售网站广告联盟接单赚钱平台
  • 医生做学分在哪个网站网站内部链接怎麽做
  • 哪个网站专做滨水景观学校网站建设目的是什么
  • 做外贸网站能用虚拟主机吗开发公司app
  • 如何能让企业做网站的打算叫别人做网站权重被转移了