1

我正在尝试使用 Ehcache 实现缓存并在 mvc-dispatcher-servlet.xml 中进行以下配置

但是在尝试调用 REST API 时出现“内部服务器错误”。

xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/mvc
    http://www.springframework.org/schema/mvc/spring-mvc.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/ldap 
    http://www.springframework.org/schema/ldap/spring-ldap.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-4.2.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">

  <cache:annotation-driven cache-manager="ehCacheManager" />
  <bean id="ehCacheManager" class="org.springframework.cache.jcache.JCacheCacheManager">
    <property name="cacheManager">
    <bean class="org.springframework.cache.jcache.JCacheManagerFactoryBean" p:cacheManagerUri="classpath:ehcache.xml" />
    </property>
  </bean>

当我单击“ http://www.springframework.org/schema/cache/spring-cache.xsd ”时,它在 Eclipse Web 浏览器中显示 HTTP 404 错误,这是问题吗?

我该如何解决这个问题?

4

0 回答 0