<?XML version= "1.0" encoding= "Utf-8"?><!DOCTYPE hibernate-configuration Public "-//hibernate/hibernate configuration DTD 3.0//en" "Http://www.hi Bernate.org/dtd/hibernate-configuration-3.0.dtd "><hibernate-configuration> <session-factory> < Propertyname= "Connection.driver_class">Oracle.jdbc.OracleDriver</ Property> < Propertyname= "Connection.url">Jbdc:oracle:thin: @localhost: 1521:orcl</ Property> < Propertyname= "Connection.username">Scott</ Property> < Propertyname= "Connection.password">123</ Property> < Propertyname= "dialect">Org.hibernate.dialect.Oracle10gDialect</ Property> < Propertyname= "Show_sql">true</ Property> < Propertyname= "Format_sql">true</ Property> < Propertyname= "Hbm2ddl.auto">Update</ Property> <!--and current thread bindings - < Propertyname= "Current_session_context_class">Thread</ Property> <!--enable level two cache <property name= "Cache.use_second_level_cache" >true</property> <! – Configure the factory using the level two cache –> <property name= "Hibernate.cache.region.factory_class" >org.hibernate.cache.ehcache.ehcacheregionfactory </property> <! – Configure Enable query caching –> <property name= "Cache.use_query_cache" >true</property> -//Haha class<Mappingclass= "entity. Membersinfo "/> </session-factory></hibernate-configuration>
Error 1.
<?xml version= "1.0" encoding= "Utf-8"? ><! DOCTYPE hibernate-configuration public "-//hibernate/hibernate configuration DTD 3.0//en" "http// Www.hibernate.org/dtd/hibernate-configuration-3.0.dtd ">
The first line is not written in the first line, the second line, the comment is not
Error 2.
<property name= "Connection.url" > jbdc:oracle:thin: @localhost: 1521:ORCL </property>
Jbdc>jdbc localhost>192.168.15.10
Error 3.
Haha class <mapping class= "entity. Membersinfo "/>
XML file, you actually use//comment, and no one
Hibernate.cfg.xml by little Guo Boots, shame Ah! Shame!! Shame Ah!!!