J'essaie actuellement d'implémenter la mise en cache pour mon application et je suis confronté à une erreur de "cvc-complex-type.2.4.c: Le caractère générique correspondant est strict, mais aucune déclaration ne peut être trouvée pour l'élément 'cache: annotation-driven'." dans mon pom.xml. Est-ce que je manque quelque chose ici?cvc-complex-type.2.4.c: Le caractère générique correspondant est strict, mais aucune déclaration ne peut être trouvée pour l'élément 'cache: annotation-driven'
pom.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:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd
http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:annotation-config />
<context:component-scan base-package="packages path" />
<!-- Enables the caching through annotations -->
<cache:annotation-driven />
<!-- Generic cache manager based on the JDK ConcurrentMap -->
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
<property name="caches">
<set>
<bean
class="org.springframework.cache.concurrent.ConcurrentMapCacheFactoryBean"
p:name="task" />
</set>
</property>
</bean>
Ah je vois comment ça fonctionne maintenant. Merci pour l'aide :) – Sebastian