以前に参照することができますプロジェクトを作成します: [研究ノート]はEclipseでのHibernateを使用して、あなたの最初のプロジェクトを作成し、データベースは、Oracle XEがあります
プロジェクトを右クリックします。
Javaのを見つけるために、Runable JARファイルを選択します
次
[完了]をクリックします
ファイルディレクトリD開き:\ jarファイルとサブディレクトリが表示されますTMPを、実行するjarファイルがjarファイルに依存しているが、このディレクトリのサブディレクトリです。
このjarファイルの実装は、DOSウィンドウを開き、次のコマンドを実行し
CDのD:\ TMP
javaの-jar Hibernate_demo_001.jar
出力は次のよう:
2019年11月23日午前10時57分45秒午前org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit> INFO:HCANN000001:{コモンズにHibernate注釈。4.0.4 最終} 市Yiyue 23 2019午前10時57分45秒AMのorg.hibernate。バージョンlogVersion INFO:HHH000412:Hibernateのコア{ 4.3.5。最後の} 十一月 23, 2019 10:57:45 上午 org.hibernate.cfg.Environment <clinit> INFO: HHH000206: hibernate.properties not found 十一月 23, 2019 10:57:45 上午 org.hibernate.cfg.Environment buildBytecodeProvider INFO: HHH000021: Bytecode provider name : javassist 十一月 23, 2019 10:57:45 上午 org.hibernate.cfg.Configuration configure INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml 十一月 23, 2019 10:57:45 上午 org.hibernate.cfg.Configuration getConfigurationInputStream INFO: HHH000040: Configuration resource: /hibernate.cfg.xml 十一月 23, 2019 10:57:45 上午 org.hibernate.cfg.Configuration doConfigure INFO: HHH000041: Configured SessionFactory: null 十一月 23, 2019 10:57:45 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure WARN: HHH000402: Using Hibernate built-in connection pool (not for production use!) 十一月 23, 2019 10:57:45 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:@localhost:1521:xe] 十一月 23, 2019 10:57:45 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH000046: Connection properties: {user=test, password=****} 十一月 23, 2019 10:57:45 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator INFO: HHH000006: Autocommit mode: false 十一月 23, 2019 10:57:45 上午 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure INFO: HHH000115: Hibernate connection pool size: 20 (min=1) 十一月 23, 2019 10:57:46 上午 org.hibernate.dialect.Dialect <init> INFO: HHH000400: Using dialect: org.hibernate.dialect.Oracle10gDialect 十一月 23, 2019 10:57:46 上午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService INFO: HHH000399: Using default transaction strategy (direct JDBC transactions) 十一月 23, 2019 10:57:46 上午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init> INFO: HHH000397: Using ASTQueryTranslatorFactory 十一月 23, 2019 10:57:46 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000228: Running hbm2ddl schema update 十一月 23, 2019 10:57:46 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000102: Fetching database metadata 十一月 23, 2019 10:57:46 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000396: Updating schema 十一月 23, 2019 10:57:47 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000261: Table found: TEST.T_EMP 十一月 23, 2019 10:57:47 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000037: Columns: [name, id, salary, age] 十一月 23, 2019 10:57:47 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000108: Foreign keys: [] 十一月 23, 2019 10:57:47 上午 org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000126: Indexes: [sys_c007000] 十一月 23, 2019 10:57:47 上午 org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000232: Schema update complete Hibernate: select test.hibernate_sequence.nextval from dual Hibernate: insert into テスト。T_EMP (年齢、名前、給与、ID) 値 (?、?、?、?) 市Yiyue 23 2019午前10時57分47秒AM org.hibernate.engine.jdbc.connections.internal。DriverManagerConnectionProviderImpl STOP INFO:HHH000030:接続プールのクリーンアップ[JDBC :オラクル:薄い:@localhost:1521 :XE ]