Spring 3 + Hibernate 4 configuration
Bonjour à tous,
Je commence à m'intéresser à Spring et je tombe face à un problème simple (peut-être). Il s'agit de la configuration basique du fichier applicationContext pour hibernate4 , il m'indique le fichier est mal formé:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| <?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:aop = "http://www.springframework.org/schema/aop"
xmlns:tx = "http://www.springframework.org/schema/tx"
xsi:schemaLocation ="
<a href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a>
<a href="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" target="_blank">http://www.springframework.org/schem...-beans-3.0.xsd</a>
<a href="http://www.springframework.org/schema/tx" target="_blank">http://www.springframework.org/schema/tx</a>
<a href="http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" target="_blank">http://www.springframework.org/schem...ing-tx-3.0.xsd</a>
<a href="http://www.springframework.org/schema/aop" target="_blank">http://www.springframework.org/schema/aop</a>
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
</beans>
<bean id="sessionFactory" scope="singleton"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="configLocation" value="classpath:hibernate.cfg.xml" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:annotation-driven />
<bean id="services" class="services.Services" scope="singleton">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean> |
Je ne vois pas où est l'erreur. Est-ce du au xmlns? ou aux balises?