Ola Pessoal!
Depois de muita luta para conseguir integrar o hibernate e spring fazendo a geracao automatica de tabelas funcionar, agora me deparo com um novo problema! o hibernate nao faz log de nada! isso na verdade nao chega a ser um grande problema, mas ele começa quando temos erros e precisamos de ver os logs para saber o que aconteceu, como estou usando o spring, nao tenho os arquivos hibernate.properties no classpath, visto que estou configurando no proprio applicationContext.xml do spring, alguem ja passou por isso? ou sabe o que devo configurar no spring para que os logs funcionem? vou postar aqui o meu applicationContext.xml, mais uma vez obrigado a atençao de todos, e de antemao agradecido tambem pela resposta que os companheiros irao dar! rs obrigado pessoal!
======================
meu applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!--
Data Source Configuration
-->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"><value>org.postgresql.Driver</value></property>
<property name="url"><value>jdbc:postgresql://localhost:5432/vandji</value></property>
<property name="username"><value>postgres</value></property>
<property name="password"><value>wiling250589*#</value></property>
</bean>
<!--
Hibernate SessionFactory
-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="configLocation" value="hibernate.cfg.xml"/>
<!-- Hibernate Configuration -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop></props>
</property>
</bean>
</beans>
Talvez eu tenha que configurar algo mais… se alguem me souber dizer o que… mais uma vez fico agradecido!
André de Souza