<! -- Database connection settings --> <property name = "connection. driver_class "> oracle. JDBC. driver. oracledriver </property> <property name = "connection. URL "> JDBC: oracle: thin: @ 127.0.0.1: 1521: orcl </property> <property name =" connection. username "> cjq </property> <property name =" connection. password "> cjq </property> <! -- JDBC connection pool (use the built-in) --> <property name = "connection. pool_size"> 1 </property> <! -- SQL Dialect --> <property name = "dialect"> org. hibernate. dialect. oracledialect </property> <! -- Enable hibernate's automatic Session Context Management --> <property name = "current_session_context_class"> thread </property> <! -- Disable the second-level cache --> <property name = "cache. provider_class"> org. hibernate. cache. Internal. nocacheprovider </property> <! -- Echo all executed SQL to stdout --> <property name = "show_ SQL"> true </property> <! -- Drop and re-create the database schema on startup --> <property name = "hbm2ddl. Auto"> Update </property>
Note: The hibernate. cfg. xml file is stored in the src directory.