Déclaration dans le fichier spring-context
:salut:
Je débute en Spring et j'essaie de faire un petit projet pour acquérir les concepts. Ce projet utilise HSQL et je galère à le faire marcher. Après tout un tas de recherches sur :google:, sur la :faq: et autres sources, je pense que l'un de mes problèmes vient des déclarations dans le fichier spring-context mais je n'arrive pas à le corriger :calim2:.
Voilà donc mon fichier spring-context
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| <?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:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd ;
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/jdbc
http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
<jdbc:embedded-database id="embeddedDatasource" type="HSQL">
<jdbc:script location="TableLivre.sql" />
</jdbc:embedded-database>
<bean class="org.springframework.jdbc.datasource.SingleConnectionDataSource" id="dataSource">
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
<property name="url" value="jdbc\:hsqldb\:mem\:spring-playground" />
<property name="username" value="sa" />
<property name="password" value="" />
</bean>
</beans> |
et l'erreur quand je lance l'application
Code:
1 2 3 4 5 6 7
| public class App {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext(
"classpath:spring-context.xml");
System.out.println("Hello World!");
}
} |
Code:
The matching wildcard is strict, but no declaration can be found for element 'jdbc:embedded-database'.
Merci d'avance et désolé car je sais que c'est vraiment un problème de noob :cry: