spring Cache 配置和调用过程

spring Cache 配置和调用过程_第1张图片在spring的配置中添加如下配置:主要有:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.1.xsd
  http://www.springframework.org/schema/aop    
          http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
          http://www.springframework.org/schema/cache
  http://www.springframework.org/schema/cache/spring-cache-4.1.xsd

          ">
    



ignore-unresolvable="true" />
ignore-unresolvable="true" />



       
           
               
                   
               

               
                   
               

           

       

   











class="com.supermap.realestate.organization.core.SuperSpringContext">


class="com.supermap.realestate.workflow.core.ProdefVersonMessage">



第二部:在对应的service的方法中添加@Cacheable即可




你可能感兴趣的:(java,spring)