Java @可缓存注释不适用于osgi蓝图
使用Blueprint在OSGi容器中打开ehcache的正确方法是什么。要为非osgi、非blueprint项目启用ehcache,我们只需使用spring注释: org.springframework.cache.annotation.Cacheable java内部:Java @可缓存注释不适用于osgi蓝图,java,osgi,ehcache,apache-karaf,blueprint-osgi,Java,Osgi,Ehcache,Apache Karaf,Blueprint Osgi,使用Blueprint在OSGi容器中打开ehcache的正确方法是什么。要为非osgi、非blueprint项目启用ehcache,我们只需使用spring注释: org.springframework.cache.annotation.Cacheable java内部: @Cacheable public void method() { } 在xml配置中: <beans xmlns:cache="http://www.springframework.org/schema/cache
@Cacheable
public void method() {
}
在xml配置中:
<beans xmlns:cache="http://www.springframework.org/schema/cache"
<cache:annotation-driven/>
...
正如您已经提到的,一种方法是不使用spring,另一种方法是使用双子座蓝图,而不是现成的白羊座蓝图。双子座蓝图确实支持spring名称空间