Spring + hibernate again, the more hateful is a configuration problem. I was assigned to run, run to continue with, myeclipse found inside some of the works or instrument has set up a number of questions.

1. Myeclipse using the add spring Capabilities and add hibernate Capabilities have hibernate related functions, configuration from XML
Is the spring and hibernate integration from XML configuration file applicationContext-hibernate.xml, Central code such as:

<bean>
		<property name="driverClassName" value="com.mysql.jdbc.Driver">
		</property>
		<property name="url" value="jdbc:mysql://localhost:3306/news"></property>
		<property name="username" ><value>root</value></property>
		<property name="password" ><value>000000</value></property>
	</bean>
	<bean
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">
					org.hibernate.dialect.MySQLDialect
				</prop>
			</props>
		</property>
		<property name="mappingResources">
			<list>
				<value>com/ly/vo/UsersCategory.hbm.xml
				</value>
				<value>com/ly/vo/NewsCategory.hbm.xml
				</value>
				<value>com/ly/vo/Users.hbm.xml</value>
				<value>com/ly/vo/News.hbm.xml</value>
				<value>com/ly/vo/NewsReview.hbm.xml
				</value>
			</list>
		</property>
	</bean>


Org.apache.commons.dbcp.BasicDataSource his type does not automatically lead into the spring have their own bag to the lib in the jakarta-commons the commons-dbcp.jar import, of course, must have the commons-collections . jar, commons-fileupload.jar, commons-io.jar, commons-validator.jar import, while the SessionFactory initialization also depend on commons-pool.jar, so have to let it back in, then, before we can use spring to manage the hibernate SessionFactory category

2. And then in spring, operation hibernate type of DAO can be used
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
This will HibernateDaoSupport succession, and then gain access to the SessionFactory this.getHibernateTemplate references, and then to check their additions and deletions.
This is very convenient, because this HibernateTemplate you hibernate package deal of things up, do not we have too many things to worry about the