Kaynağa Gözat

加入redis 和 ehcache 缓存系统,规则引擎服务彻底完工

wuxw7 8 yıl önce
ebeveyn
işleme
00a9bbf99a
42 değiştirilmiş dosya ile 1379 ekleme ve 497 silme
  1. 13 0
      .idea/libraries/Maven__junit_junit_4_12.xml
  2. 13 0
      .idea/libraries/Maven__net_sf_ehcache_ehcache_2_10_2.xml
  3. 13 0
      .idea/libraries/Maven__org_apache_commons_commons_pool2_2_2.xml
  4. 13 0
      .idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_4_0_RELEASE.xml
  5. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_commons_1_12_2_RELEASE.xml
  6. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_1_1_2_RELEASE.xml
  7. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_redis_1_7_2_RELEASE.xml
  8. 13 0
      .idea/libraries/Maven__org_springframework_spring_oxm_4_3_2_RELEASE.xml
  9. 13 0
      .idea/libraries/Maven__redis_clients_jedis_2_8_2.xml
  10. 483 446
      .idea/workspace.xml
  11. 9 0
      BaseService/BaseService.iml
  12. 9 0
      MerchantService/MerchantService.iml
  13. 1 1
      MicroCommunity.iml
  14. 9 0
      OrderService/OrderService.iml
  15. 1 0
      PayService/PayService.iml
  16. 9 0
      RuleService/RuleService.iml
  17. 3 3
      RuleService/src/main/java/com/java110/rule/common/RuleCommon.java
  18. 27 0
      RuleService/src/main/java/com/java110/rule/dao/IRuleDao.java
  19. 155 3
      RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java
  20. 15 3
      RuleService/src/main/java/com/java110/rule/smo/impl/RuleServiceSMOImpl.java
  21. 9 0
      UserService/UserService.iml
  22. 1 0
      Wechat/Wechat.iml
  23. 2 1
      bean/src/main/java/com/java110/entity/rule/Rule.java
  24. 2 1
      bean/src/main/java/com/java110/entity/rule/RuleCondCfg.java
  25. 4 1
      bean/src/main/java/com/java110/entity/rule/RuleEntrance.java
  26. 13 3
      common/common.iml
  27. 11 0
      common/pom.xml
  28. 10 0
      common/src/main/java/com/java110/common/constant/RuleDomain.java
  29. 7 19
      common/src/main/java/com/java110/common/util/RuleUtil.java
  30. 152 0
      common/src/main/java/com/java110/common/util/SerializeUtil.java
  31. 45 0
      config/src/main/resources/cache/ehcache.xml
  32. 19 0
      config/src/main/resources/cache/redis.conf
  33. 57 0
      config/src/main/resources/mapper/rule/RuleDaoImplMapper.xml
  34. 19 10
      core/core.iml
  35. 18 0
      core/pom.xml
  36. 11 0
      core/src/main/java/com/java110/core/base/dao/BaseServiceDao.java
  37. 35 0
      core/src/main/java/com/java110/core/cache/CacheConfiguration.java
  38. 51 0
      core/src/main/java/com/java110/core/cache/RedisConfiguration.java
  39. 48 0
      core/src/test/java/com/java110/core/cache/TestRedis.java
  40. 1 0
      feign/feign.iml
  41. 16 5
      pom.xml
  42. 10 1
      service/service.iml

+ 13 - 0
.idea/libraries/Maven__junit_junit_4_12.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: junit:junit:4.12">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__net_sf_ehcache_ehcache_2_10_2.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: net.sf.ehcache:ehcache:2.10.2">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/net/sf/ehcache/ehcache/2.10.2/ehcache-2.10.2.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/net/sf/ehcache/ehcache/2.10.2/ehcache-2.10.2-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/net/sf/ehcache/ehcache/2.10.2/ehcache-2.10.2-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_apache_commons_commons_pool2_2_2.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.apache.commons:commons-pool2:2.2">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-pool2/2.2/commons-pool2-2.2-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_redis_1_4_0_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-redis/1.4.0.RELEASE/spring-boot-starter-redis-1.4.0.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-redis/1.4.0.RELEASE/spring-boot-starter-redis-1.4.0.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-redis/1.4.0.RELEASE/spring-boot-starter-redis-1.4.0.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_commons_1_12_2_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/1.12.2.RELEASE/spring-data-commons-1.12.2.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/1.12.2.RELEASE/spring-data-commons-1.12.2.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/1.12.2.RELEASE/spring-data-commons-1.12.2.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_1_1_2_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/1.1.2.RELEASE/spring-data-keyvalue-1.1.2.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/1.1.2.RELEASE/spring-data-keyvalue-1.1.2.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/1.1.2.RELEASE/spring-data-keyvalue-1.1.2.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_redis_1_7_2_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/1.7.2.RELEASE/spring-data-redis-1.7.2.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/1.7.2.RELEASE/spring-data-redis-1.7.2.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/1.7.2.RELEASE/spring-data-redis-1.7.2.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_spring_oxm_4_3_2_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/4.3.2.RELEASE/spring-oxm-4.3.2.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/4.3.2.RELEASE/spring-oxm-4.3.2.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/4.3.2.RELEASE/spring-oxm-4.3.2.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__redis_clients_jedis_2_8_2.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: redis.clients:jedis:2.8.2">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/redis/clients/jedis/2.8.2/jedis-2.8.2.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/redis/clients/jedis/2.8.2/jedis-2.8.2-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/redis/clients/jedis/2.8.2/jedis-2.8.2-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 483 - 446
.idea/workspace.xml


+ 9 - 0
BaseService/BaseService.iml

@@ -25,10 +25,19 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />

+ 9 - 0
MerchantService/MerchantService.iml

@@ -24,10 +24,19 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />

+ 1 - 1
MicroCommunity.iml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6">
     <output url="file://$MODULE_DIR$/target/classes" />
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
     <content url="file://$MODULE_DIR$">

+ 9 - 0
OrderService/OrderService.iml

@@ -25,10 +25,19 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />

+ 1 - 0
PayService/PayService.iml

@@ -24,6 +24,7 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />

+ 9 - 0
RuleService/RuleService.iml

@@ -24,10 +24,19 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />

+ 3 - 3
RuleService/src/main/java/com/java110/rule/common/RuleCommon.java

@@ -49,7 +49,7 @@ public class RuleCommon extends LoggerEngine{
         java.sql.Timestamp startTime = new java.sql.Timestamp(Calendar.getInstance().getTime().getTime());
 
         String condReturnXml = "";
-        Map<String,Rule> ruleMap = RuleUtil.getRuleMap();
+        Map<String,Rule> ruleMap = ruleDaoImpl.getRuleMap();
         Rule rule = ruleMap.get(ruleId);
 
         Map<String,String> map = new HashMap<String,String>();
@@ -96,7 +96,7 @@ public class RuleCommon extends LoggerEngine{
 
         Map<String,String> returnMap = new HashMap<String,String>();
         dataStackMap = new HashMap<String,String>();
-        Map<String,Rule> ruleMap = RuleUtil.getRuleMap();
+        Map<String,Rule> ruleMap = ruleDaoImpl.getRuleMap();
         List<RuleCondCfg> ruleCondCfgList = ruleMap.get(ruleId).getRuleCondCfgs();
         ruleNodeMap = new HashMap<String,String>();
         ruleDbMap = new HashMap<String, List<Map<String,String>>>();
@@ -432,7 +432,7 @@ public class RuleCommon extends LoggerEngine{
         java.sql.Timestamp startTime = new java.sql.Timestamp(Calendar.getInstance().getTime().getTime());
 
         String condReturnXml = "";
-        Map<String,Rule> ruleMap = RuleUtil.getRuleMap();
+        Map<String,Rule> ruleMap = ruleDaoImpl.getRuleMap();
         Rule rule = ruleMap.get(ruleId);
         if(!StringUtils.isEmpty(rule.getRule_url())){
 

+ 27 - 0
RuleService/src/main/java/com/java110/rule/dao/IRuleDao.java

@@ -1,5 +1,8 @@
 package com.java110.rule.dao;
 
+import com.java110.entity.rule.Rule;
+import com.java110.entity.rule.RuleEntrance;
+
 import java.util.List;
 import java.util.Map;
 
@@ -19,4 +22,28 @@ public interface IRuleDao {
 
 
     public String executeProc(String transactionId,String paramIn,String procName) throws Exception;
+
+
+    /**
+     *  查询Rule_Entrance
+     * @return
+     * @throws Exception
+     */
+    public Map<String,RuleEntrance> getRuleEntranceMap() throws Exception;
+
+
+    /**
+     * 查询规则组关系信息
+     * @return
+     * @throws Exception
+     */
+    public  List getRuleGroupRelaList() throws Exception;
+
+
+    /**
+     * 查询规则信息
+     * @return
+     * @throws Exception
+     */
+    public Map<String, Rule> getRuleMap() throws Exception;
 }

+ 155 - 3
RuleService/src/main/java/com/java110/rule/dao/impl/RuleDaoImpl.java

@@ -1,13 +1,19 @@
 package com.java110.rule.dao.impl;
 
+import com.java110.common.constant.RuleDomain;
+import com.java110.common.util.SerializeUtil;
 import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.entity.rule.Rule;
+import com.java110.entity.rule.RuleCondCfg;
+import com.java110.entity.rule.RuleEntrance;
 import com.java110.rule.dao.IRuleDao;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+import redis.clients.jedis.Jedis;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * Created by wuxw on 2017/7/23.
@@ -16,6 +22,8 @@ import java.util.Map;
 @Service("ruleDaoImpl")
 @Transactional
 public class RuleDaoImpl extends BaseServiceDao implements IRuleDao {
+
+
     @Override
     public List<Map<String, String>> executeSql(String sql) throws Exception {
         return sqlSessionTemplate.selectList("ruleDaoImpl.executeSql",sql);
@@ -46,4 +54,148 @@ public class RuleDaoImpl extends BaseServiceDao implements IRuleDao {
         }
         return null;
     }
+
+    /**
+     * 查询 rule_entrance表信息
+     *
+     * 这里逻辑,首先从ehCache 中获取数据,如果没有缓存,则校验redis中是否存在,如果不存在从数据库中查询,然后保存至redis中,
+     * 自动缓存到ehcache 中(默认是10分钟)
+     * @return
+     * @throws Exception
+     */
+    @Override
+    @Cacheable(key=RuleDomain.REDIS_KEY_RULE_ENTRANCE)
+    public Map<String, RuleEntrance> getRuleEntranceMap() throws Exception {
+
+        Jedis jedis = jedisPool.getResource();
+
+        Map map = new HashMap();
+
+        List<RuleEntrance> list = null;
+
+        if(jedis.exists(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes())){
+            list =  SerializeUtil.unserializeList(jedis.get(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes()),RuleEntrance.class);
+        }else{
+            list = sqlSessionTemplate.selectList("ruleDaoImpl.getRuleEntranceMap");
+            //将 数据缓存至redis中
+
+            jedis.set(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes(),SerializeUtil.serializeList(list));
+        }
+
+        if (null != list && !list.isEmpty()) {
+            RuleEntrance ruleEntrance = null;
+            for (int ruleEntranceIndex = 0;ruleEntranceIndex< list.size();ruleEntranceIndex++) {
+                ruleEntrance =  list.get(ruleEntranceIndex);
+                map.put(String.valueOf(ruleEntranceIndex), ruleEntrance);
+            }
+        }
+        return map;
+    }
+
+    /**
+     * 初始化业务规则分组和编码映射关联关系信息
+     * @return
+     * @throws Exception
+     */
+    @Override
+    @Cacheable(key=RuleDomain.REDIS_KEY_RULE_GROUP)
+    public List getRuleGroupRelaList() throws Exception {
+        List saopRuleGroupRelaList = new ArrayList();
+
+        Jedis jedis = jedisPool.getResource();
+
+        if(jedis.exists(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes())){
+            saopRuleGroupRelaList =  SerializeUtil.unserializeList(jedis.get(RuleDomain.REDIS_KEY_RULE_GROUP.getBytes()),Map.class);
+        }else {
+            //查询全部业务规则分组信息
+            List allSaopRuleGroupInfoList = sqlSessionTemplate.selectList("ruleDaoImpl.querySaopRuleGroupMap");
+
+            //业务分组和编码映射关系集合
+            List allsaopRuleGroupRelaInfoList = sqlSessionTemplate.selectList("ruleDaoImpl.querySaopRuleGroupRelaMap");
+
+            int allSaopRuleGroupInfoListSize = allSaopRuleGroupInfoList.size();
+            int allsaopRuleGroupRelaInfoListSize = allsaopRuleGroupRelaInfoList.size();
+
+            if (allSaopRuleGroupInfoListSize > 0 && allsaopRuleGroupRelaInfoListSize > 0) {
+                for (int i = 0; i < allSaopRuleGroupInfoListSize; i++) {
+                    //每个业务规则分组项
+                    Map saopRuleGroupMap = (Map) allSaopRuleGroupInfoList.get(i);
+                    if (null == saopRuleGroupMap || null == saopRuleGroupMap.get("groupId")) {
+                        continue;
+                    }
+
+                    //当前规则分组编码
+                    String curRuleGroupId = String.valueOf(saopRuleGroupMap.get("groupId"));
+
+                    //当前业务规则分组下的规则编码集合
+                    List ruleIdList = new ArrayList();
+                    saopRuleGroupMap.put("ruleIdList", ruleIdList);
+
+                    for (int j = 0; j < allsaopRuleGroupRelaInfoListSize; j++) {
+                        Map saopRuleGroupRelaMap = (Map) allsaopRuleGroupRelaInfoList.get(j);
+                        if (null == saopRuleGroupRelaMap || null == saopRuleGroupRelaMap.get("groupId")) {
+                            continue;
+                        }
+
+                        //当前规则分组编码
+                        String ruleRelaGroupId = String.valueOf(saopRuleGroupRelaMap.get("groupId"));
+
+                        if (curRuleGroupId.equals(ruleRelaGroupId)) {
+                            //获取规则编码
+                            String ruleId = "";
+                            if (null != saopRuleGroupRelaMap.get("rule_id")) {
+                                ruleId = String.valueOf(saopRuleGroupRelaMap.get("rule_id"));
+                            }
+
+                            if (!StringUtils.isEmpty(ruleId)) {
+                                ruleIdList.add(ruleId);
+                            }
+                        }
+                    }
+                }
+
+                saopRuleGroupRelaList = allSaopRuleGroupInfoList;
+
+                jedis.set(RuleDomain.REDIS_KEY_RULE_ENTRANCE.getBytes(),SerializeUtil.serializeList(saopRuleGroupRelaList));
+            }
+        }
+
+
+        return saopRuleGroupRelaList;
+    }
+
+    @Override
+    @Cacheable(key=RuleDomain.REDIS_KEY_RULE)
+    public Map<String, Rule> getRuleMap() throws Exception {
+
+        Jedis jedis = jedisPool.getResource();
+
+        List<Rule> ruleList = null;
+
+        Map map = new HashMap();
+
+        if(jedis.exists(RuleDomain.REDIS_KEY_RULE.getBytes())){
+            ruleList =  SerializeUtil.unserializeList(jedis.get(RuleDomain.REDIS_KEY_RULE.getBytes()),Rule.class);
+        }else{
+            ruleList = sqlSessionTemplate.selectList("ruleDaoImpl.queryRule");
+            for (Rule rule : ruleList) {
+                String ruleId = rule.getRule_id();
+                List<RuleCondCfg> ruleCondCfgList = sqlSessionTemplate.selectList("ruleDaoImpl.queryRuleCondCfg", ruleId);
+                rule.setRuleCondCfgs(ruleCondCfgList);
+            }
+            //将 数据缓存至redis中
+
+            jedis.set(RuleDomain.REDIS_KEY_RULE.getBytes(),SerializeUtil.serializeList(ruleList));
+        }
+
+        if (null != ruleList && !ruleList.isEmpty()) {
+            Rule rule = null;
+            for (Iterator i = ruleList.iterator(); i.hasNext();) {
+                rule = (Rule) i.next();
+                map.put(rule.getRule_id(), rule);
+            }
+        }
+
+        return map;
+    }
 }

+ 15 - 3
RuleService/src/main/java/com/java110/rule/smo/impl/RuleServiceSMOImpl.java

@@ -11,6 +11,7 @@ import com.java110.entity.rule.Rule;
 import com.java110.entity.rule.RuleEntrance;
 import com.java110.entity.rule.TcpContRule;
 import com.java110.rule.common.RuleCommon;
+import com.java110.rule.dao.IRuleDao;
 import com.java110.rule.smo.IRuleServiceSMO;
 import com.java110.rule.thread.RuleCommonThread;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -36,6 +37,9 @@ public class RuleServiceSMOImpl extends BaseServiceSMO implements IRuleServiceSM
     @Autowired
     RuleCommon ruleCommon;
 
+    @Autowired
+    IRuleDao ruleDaoImpl;
+
 
 
 
@@ -127,12 +131,12 @@ public class RuleServiceSMOImpl extends BaseServiceSMO implements IRuleServiceSM
         String roamFlag = RuleDomain.RULE_COND_RETURN_0000;
             String depPrvncSaopRuleType = CodeMapUtil.getDynamicConstantValue("DEP_PRVNC_RULE_TYPE");
             //获取表 Rule_Entrance 数据
-            Map<String,RuleEntrance> ruleEntranceMap = RuleUtil.getRuleEntranceMap();
+            Map<String,RuleEntrance> ruleEntranceMap = ruleDaoImpl.getRuleEntranceMap();
             int ruleCount = 0;
             this.ruleCommon.init();
 
             //当前分组下的规则编码集合
-            List ruleIdsInCurGroupList = RuleUtil.getRuleIdsInGroupByJson(reqJson.toJSONString());
+            List ruleIdsInCurGroupList = RuleUtil.getRuleIdsInGroupByJson(reqJson.toJSONString(),ruleDaoImpl.getRuleGroupRelaList());
 
             //耗时明细信息集合
             List costTimeMapList = new ArrayList();
@@ -182,7 +186,7 @@ public class RuleServiceSMOImpl extends BaseServiceSMO implements IRuleServiceSM
                     ruleCount ++;
                     ruleList.add(ruleEntrance.getRule_id());
                 }else{//配置1为单线程串行调用模式
-                    Rule rule = RuleUtil.getRuleMap().get(ruleEntrance.getRule_id());
+                    Rule rule = ruleDaoImpl.getRuleMap().get(ruleEntrance.getRule_id());
                     String url = rule.getRule_url();
                     String entranceRetrunXml = "";
                     if(!StringUtils.isEmpty(url)){
@@ -252,4 +256,12 @@ public class RuleServiceSMOImpl extends BaseServiceSMO implements IRuleServiceSM
     public void setRuleCommon(RuleCommon ruleCommon) {
         this.ruleCommon = ruleCommon;
     }
+
+    public IRuleDao getRuleDaoImpl() {
+        return ruleDaoImpl;
+    }
+
+    public void setRuleDaoImpl(IRuleDao ruleDaoImpl) {
+        this.ruleDaoImpl = ruleDaoImpl;
+    }
 }

+ 9 - 0
UserService/UserService.iml

@@ -25,10 +25,19 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />

+ 1 - 0
Wechat/Wechat.iml

@@ -25,6 +25,7 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />

+ 2 - 1
bean/src/main/java/com/java110/entity/rule/Rule.java

@@ -1,5 +1,6 @@
 package com.java110.entity.rule;
 
+import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
 
@@ -7,7 +8,7 @@ import java.util.List;
  * 业务规则主体
  * Created by wuxw on 2017/7/23.
  */
-public class Rule {
+public class Rule implements Serializable{
 
     private String rule_id;
 

+ 2 - 1
bean/src/main/java/com/java110/entity/rule/RuleCondCfg.java

@@ -1,12 +1,13 @@
 package com.java110.entity.rule;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
  *
  * Created by wuxw on 2017/7/23.
  */
-public class RuleCondCfg {
+public class RuleCondCfg implements Serializable{
 
     private String rule_id;
     private String rule_node;

+ 4 - 1
bean/src/main/java/com/java110/entity/rule/RuleEntrance.java

@@ -1,12 +1,15 @@
 package com.java110.entity.rule;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
  * 对应表rule_entrance
  * Created by wuxw on 2017/7/23.
  */
-public class RuleEntrance {
+public class RuleEntrance implements Serializable {
+
+
 
     private String rule_id;
 

+ 13 - 3
common/common.iml

@@ -24,11 +24,11 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:1.4.0.RELEASE" level="project" />
@@ -36,6 +36,17 @@
     <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.7" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.7" level="project" />
     <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework:spring-tx:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.4" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.4" level="project" />
@@ -48,7 +59,6 @@
     <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.1" level="project" />
     <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.1" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.2.RELEASE" level="project" />

+ 11 - 0
common/pom.xml

@@ -73,6 +73,11 @@
             <artifactId>logback-classic</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>net.sf.ehcache</groupId>
+            <artifactId>ehcache</artifactId>
+        </dependency>
+
 
 
         <dependency>
@@ -84,5 +89,11 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 </project>

+ 10 - 0
common/src/main/java/com/java110/common/constant/RuleDomain.java

@@ -57,4 +57,14 @@ public class RuleDomain {
     public static final String PART_STRING_ORIGINAL_VALUE = "ORIGINAL_VALUE"; //表示字符串:ORIGINAL_VALUE,含义是在处理字符串时表示没有被任何改变的“原始值”标识
 
 
+    /**
+     * redis key 开始设置
+     */
+    public final static String REDIS_KEY_RULE_ENTRANCE ="RuleEntrance"; // redis key RuleEntrance
+
+
+    public final static String REDIS_KEY_RULE ="Rule"; // redis key Rule
+
+
+    public final static String REDIS_KEY_RULE_GROUP ="Rule_Group"; // redis key Rule
 }

+ 7 - 19
common/src/main/java/com/java110/common/util/RuleUtil.java

@@ -3,6 +3,11 @@ package com.java110.common.util;
 import com.java110.common.log.LoggerEngine;
 import com.java110.entity.rule.Rule;
 import com.java110.entity.rule.RuleEntrance;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.data.redis.core.ListOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import redis.clients.jedis.Jedis;
+import redis.clients.jedis.JedisPool;
 
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -15,23 +20,6 @@ import java.util.Map;
  */
 public class RuleUtil extends LoggerEngine{
 
-   public static Map<String,RuleEntrance> getRuleEntranceMap(){
-
-       return null;
-   }
-
-    /**
-     * 获取规则组
-     * @return
-     */
-    public static List getRuleGroupRelaList() {
-        return null;
-    }
-
-
-    public static Map<String, Rule> getRuleMap() {
-        return null;
-    }
 
 
     /**
@@ -39,10 +27,10 @@ public class RuleUtil extends LoggerEngine{
      * @param reqJson
      * @return   如果获取不到则会返回new ArrayList(),不会为null
      */
-    public static List getRuleIdsInGroupByJson(String reqJson)
+    public static List getRuleIdsInGroupByJson(String reqJson,List saopRuleGroupInfoList)
     {
         //获取缓存中规则分组集合
-        List saopRuleGroupInfoList = RuleUtil.getRuleGroupRelaList();
+        //List saopRuleGroupInfoList = RuleUtil.getRuleGroupRelaList();
 
         //当前分组下的规则编码集合
         List ruleIdsInCurGroupList = new ArrayList();

+ 152 - 0
common/src/main/java/com/java110/common/util/SerializeUtil.java

@@ -0,0 +1,152 @@
+package com.java110.common.util;
+
+/**
+ * Created by wuxw on 2017/7/23.
+ */
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * 序列化工具类
+ * @author caspar
+ *
+ */
+public class SerializeUtil {
+
+    /**
+     * 序列化
+     * @param object
+     * @return
+     */
+    public static byte[] serialize(Object object) {
+        if (object == null) {
+            return null;
+        }
+        ObjectOutputStream oos = null;
+        ByteArrayOutputStream baos = null;
+        byte[] bytes = null;
+        try {
+            // 序列化
+            baos = new ByteArrayOutputStream();
+            oos = new ObjectOutputStream(baos);
+            oos.writeObject(object);
+            bytes = baos.toByteArray();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            close(oos);
+            close(baos);
+        }
+        return bytes;
+    }
+
+    /**
+     * 反序列化
+     *
+     * @param bytes
+     * @return
+     */
+    public static Object unserialize(byte[] bytes) {
+        if (bytes == null) {
+            return null;
+        }
+        ByteArrayInputStream bais = null;
+        ObjectInputStream ois = null;
+        try {
+            // 反序列化
+            bais = new ByteArrayInputStream(bytes);
+            ois = new ObjectInputStream(bais);
+            return ois.readObject();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            close(bais);
+            close(ois);
+        }
+        return null;
+    }
+
+    /**
+     * 序列化 list 集合
+     *
+     * @param list
+     * @return
+     */
+    public static byte[] serializeList(List<?> list) {
+
+        if (list == null || list.size() == 0) {
+            return null;
+        }
+        ObjectOutputStream oos = null;
+        ByteArrayOutputStream baos = null;
+        byte[] bytes = null;
+        try {
+            baos = new ByteArrayOutputStream();
+            oos = new ObjectOutputStream(baos);
+            for (Object obj : list) {
+                oos.writeObject(obj);
+            }
+            bytes = baos.toByteArray();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            close(oos);
+            close(baos);
+        }
+        return bytes;
+    }
+
+    /**
+     * 反序列化 list 集合
+     *
+     * @param
+     * @return
+     */
+    public static <T> List<T>  unserializeList(byte[] bytes,Class<T> t) {
+        if (bytes == null) {
+            return null;
+        }
+
+        List<T> list = new ArrayList<T>();
+        ByteArrayInputStream bais = null;
+        ObjectInputStream ois = null;
+        try {
+            // 反序列化
+            bais = new ByteArrayInputStream(bytes);
+            ois = new ObjectInputStream(bais);
+            while (bais.available() > 0) {
+                T obj = (T) ois.readObject();
+                if (obj == null) {
+                    break;
+                }
+                list.add(obj);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            close(bais);
+            close(ois);
+        }
+        return list;
+    }
+
+    /**
+     * 关闭io流对象
+     *
+     * @param closeable
+     */
+    public static void close(Closeable closeable) {
+        if (closeable != null) {
+            try {
+                closeable.close();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+}

+ 45 - 0
config/src/main/resources/cache/ehcache.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
+
+    <!-- 磁盘缓存位置 -->
+    <diskStore path="java.io.tmpdir/ehcache"/>
+
+    <!-- 默认缓存 -->
+    <defaultCache
+            maxEntriesLocalHeap="10000"
+            eternal="false"
+            timeToIdleSeconds="120"
+            timeToLiveSeconds="120"
+            maxEntriesLocalDisk="10000000"
+            diskExpiryThreadIntervalSeconds="120"
+            memoryStoreEvictionPolicy="LRU"/>
+
+    <!-- helloworld缓存 -->
+    <cache name="helloworld"
+           maxElementsInMemory="1000"
+           eternal="false"
+           timeToIdleSeconds="5"
+           timeToLiveSeconds="5"
+           overflowToDisk="false"
+           memoryStoreEvictionPolicy="LRU"/>
+
+    <!--
+    ehcache.xml配置参数说明:
+
+name:缓存名称。
+maxElementsInMemory:缓存最大个数。
+eternal:缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期。
+timeToIdleSeconds:置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。
+timeToLiveSeconds:缓存数据的生存时间(TTL),也就是一个元素从构建到消亡的最大时间间隔值,这只能在元素不是永久驻留时有效,如果该值是0就意味着元素可以停顿无穷长的时间。
+maxEntriesLocalDisk:当内存中对象数量达到maxElementsInMemory时,Ehcache将会对象写到磁盘中。
+overflowToDisk:内存不足时,是否启用磁盘缓存。
+diskSpoolBufferSizeMB:这个参数设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区。
+maxElementsOnDisk:硬盘最大缓存个数。
+diskPersistent:是否在VM重启时存储硬盘的缓存数据。默认值是false。
+diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是120秒。
+memoryStoreEvictionPolicy:当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。
+clearOnFlush:内存数量最大时是否清除。
+
+    -->
+</ehcache>

+ 19 - 0
config/src/main/resources/cache/redis.conf

@@ -0,0 +1,19 @@
+# REDIS (RedisProperties)
+# Redis数据库索引(默认为0)
+spring.redis.database=0
+# Redis服务器地址
+spring.redis.host=192.168.0.58
+# Redis服务器连接端口
+spring.redis.port=6379
+# Redis服务器连接密码(默认为空)
+spring.redis.password=
+# 连接池最大连接数(使用负值表示没有限制)
+spring.redis.pool.max-active=8
+# 连接池最大阻塞等待时间(使用负值表示没有限制)
+spring.redis.pool.max-wait=-1
+# 连接池中的最大空闲连接
+spring.redis.pool.max-idle=8
+# 连接池中的最小空闲连接
+spring.redis.pool.min-idle=0
+# 连接超时时间(毫秒)
+spring.redis.timeout=0

+ 57 - 0
config/src/main/resources/mapper/rule/RuleDaoImplMapper.xml

@@ -19,4 +19,61 @@
     <update id="executeProc" parameterMap="executeProMap" statementType="CALLABLE">
         {call $procName$(?, ?, ?)}
     </update>
+
+    <!-- 查询表 rule_entrance 中数据 -->
+    <select id="getRuleEntranceMap" resultType="com.java110.entity.rule.RuleEntrance">
+        SELECT T.rule_id,
+        T.rule_condition,
+        T.status_cd,
+        T.create_dt
+        FROM rule_entrance T
+        WHERE T.STATUS_CD = '0' ORDER BY T.rule_id
+    </select>
+    <!-- 查询表 rule -->
+    <select id="queryRule" resultType="com.java110.entity.rule.Rule">
+        SELECT T.rule_id, T.rule_code, T.rule_name, T.rule_desc,T.rule_level,T.rule_type,T.rule_url,T.status_cd,T.create_dt
+        FROM rule T
+        WHERE T.status_cd = '0'
+
+    </select>
+    <!--查询表 rule_cond_cfg-->
+    <select id="queryRuleCondCfg" resultType="com.java110.entity.rule.RuleCondCfg">
+        SELECT
+        T.rule_id,
+        T.rule_node,
+        T.data_from_flag,
+        T.db_sql,
+        T.default_value,
+        T.node_existed,
+        T.proc_param_flag,
+        T.is_reverse,
+        T.is_log,
+        T.error_code,
+        T.error_msg,
+        T.remark,
+        T.seq,
+        T.data_stack_flag_prefix,
+        T.jpath,
+        T.status_cd,
+        T.create_dt
+        FROM rule_cond_cfg T
+        WHERE T.rule_id = #{ruleId}
+        AND status_cd = '0'
+        ORDER BY seq
+    </select>
+
+    <!--规则组-->
+    <select id="querySaopRuleGroupMap" resultType="java.util.HashMap">
+        SELECT T.groupId, T.groupName, T.order_seq, T.key_identify_logic_str
+        FROM rule_group T
+        WHERE T.status_cd = '0'
+        ORDER BY T.order_seq
+    </select>
+
+    <!--规则组与规则关系-->
+    <select id="querySaopRuleGroupRelaMap"  resultType="java.util.HashMap">
+        SELECT T.groupId, T.rule_id
+        FROM group_rule_relation T
+        WHERE T.status_cd = '0'
+    </select>
  </mapper>

+ 19 - 10
core/core.iml

@@ -24,6 +24,7 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
@@ -38,15 +39,29 @@
     <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jdbc:8.5.4" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.4" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.4.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.7" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.7" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.7" level="project" />
     <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.7" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.4" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.4" level="project" />
@@ -59,11 +74,7 @@
     <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.8.1" level="project" />
     <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.8.1" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-aop:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-context:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.2.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:1.4.0.RELEASE" level="project" />
@@ -74,10 +85,8 @@
     <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:2.5.0" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:1.10.19" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.3.0" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-core:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:4.3.2.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:1.4.0.RELEASE" level="project" />

+ 18 - 0
core/pom.xml

@@ -28,9 +28,27 @@
             <scope>provided</scope>
         </dependency>
 
+
+
         <dependency>
             <groupId>org.mybatis.spring.boot</groupId>
             <artifactId>mybatis-spring-boot-starter</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

+ 11 - 0
core/src/main/java/com/java110/core/base/dao/BaseServiceDao.java

@@ -6,6 +6,7 @@ import com.java110.common.log.LoggerEngine;
 import com.java110.core.base.AppBase;
 import org.mybatis.spring.SqlSessionTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
+import redis.clients.jedis.JedisPool;
 
 import java.util.List;
 import java.util.Map;
@@ -19,6 +20,9 @@ import java.util.logging.Logger;
  */
 public class BaseServiceDao extends AppBase {
 
+    @Autowired
+   protected JedisPool jedisPool;
+
     @Autowired
    protected SqlSessionTemplate sqlSessionTemplate;
 
@@ -31,6 +35,13 @@ public class BaseServiceDao extends AppBase {
         this.sqlSessionTemplate = sqlSessionTemplate;
     }
 
+    public JedisPool getJedisPool() {
+        return jedisPool;
+    }
+
+    public void setJedisPool(JedisPool jedisPool) {
+        this.jedisPool = jedisPool;
+    }
 
     private final static String SERVICE_CASE_JSON_EXCEPTION = "101";//转json异常
 

+ 35 - 0
core/src/main/java/com/java110/core/cache/CacheConfiguration.java

@@ -0,0 +1,35 @@
+package com.java110.core.cache;
+
+import org.springframework.beans.factory.annotation.Configurable;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.ehcache.EhCacheCacheManager;
+import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.core.io.ClassPathResource;
+
+/**
+ * Created by wuxw on 2017/7/23.
+ */
+@Configurable
+@EnableCaching
+public class CacheConfiguration {
+
+    /*
+    * ehcache 主要的管理器
+    */
+    @Bean(name = "appEhCacheCacheManager")
+    public EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){
+        return new EhCacheCacheManager (bean.getObject ());
+    }
+
+    /*
+     * 据shared与否的设置,Spring分别通过CacheManager.create()或new CacheManager()方式来创建一个ehcache基地.
+     */
+    @Bean
+    public EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){
+        EhCacheManagerFactoryBean cacheManagerFactoryBean = new EhCacheManagerFactoryBean ();
+        cacheManagerFactoryBean.setConfigLocation (new ClassPathResource("cache/ehcache-app.xml"));
+        cacheManagerFactoryBean.setShared (true);
+        return cacheManagerFactoryBean;
+    }
+}

+ 51 - 0
core/src/main/java/com/java110/core/cache/RedisConfiguration.java

@@ -0,0 +1,51 @@
+package com.java110.core.cache;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.PropertyAccessor;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.CachingConfigurerSupport;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.interceptor.KeyGenerator;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheManager;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
+import redis.clients.jedis.JedisPool;
+import redis.clients.jedis.JedisPoolConfig;
+
+import java.lang.reflect.Method;
+
+/**
+ * Created by wuxw on 2017/7/23.
+ */
+@Configuration
+public class RedisConfiguration extends CachingConfigurerSupport {
+
+    @Bean(name= "jedis.pool")
+    @Autowired
+    public JedisPool jedisPool(@Qualifier("jedis.pool.config") JedisPoolConfig config,
+                               @Value("${jedis.pool.host}")String host,
+                               @Value("${jedis.pool.port}")int port) {
+        return new JedisPool(config, host, port);
+    }
+
+    @Bean(name= "jedis.pool.config")
+    public JedisPoolConfig jedisPoolConfig (@Value("${jedis.pool.config.maxTotal}")int maxTotal,
+                                            @Value("${jedis.pool.config.maxIdle}")int maxIdle,
+                                            @Value("${jedis.pool.config.maxWaitMillis}")int maxWaitMillis) {
+        JedisPoolConfig config = new JedisPoolConfig();
+        config.setMaxTotal(maxTotal);
+        config.setMaxIdle(maxIdle);
+        config.setMaxWaitMillis(maxWaitMillis);
+        return config;
+    }
+
+
+}

+ 48 - 0
core/src/test/java/com/java110/core/cache/TestRedis.java

@@ -0,0 +1,48 @@
+package com.java110.core.cache;
+
+import javafx.application.Application;
+import junit.framework.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.SpringApplicationConfiguration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * Created by wuxw on 2017/7/23.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@SpringApplicationConfiguration(Application.class)
+public class TestRedis {
+
+    @Autowired
+    private StringRedisTemplate stringRedisTemplate;
+
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+    @Test
+    public void test() throws Exception {
+        stringRedisTemplate.opsForValue().set("aaa", "111");
+        Assert.assertEquals("111", stringRedisTemplate.opsForValue().get("aaa"));
+    }
+
+    @Test
+    public void testObj() throws Exception {
+        /*User user=new User("aa@126.com", "aa", "aa123456", "aa","123");
+        ValueOperations<String, User> operations=redisTemplate.opsForValue();
+        operations.set("com.neox", user);
+        operations.set("com.neo.f", user,1,TimeUnit.SECONDS);
+        Thread.sleep(1000);
+        //redisTemplate.delete("com.neo.f");
+        boolean exists=redisTemplate.hasKey("com.neo.f");
+        if(exists){
+            System.out.println("exists is true");
+        }else{
+            System.out.println("exists is false");
+        }*/
+        // Assert.assertEquals("aa", operations.get("com.neo.f").getUserName());
+    }
+}

+ 1 - 0
feign/feign.iml

@@ -24,6 +24,7 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.7" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />

+ 16 - 5
pom.xml

@@ -175,11 +175,11 @@
                 <version>${activemq.version}</version>
             </dependency>
 
-                        <dependency>
-                            <groupId>org.springframework</groupId>
-                            <artifactId>spring-jms</artifactId>
-                            <version>${spring.version}</version>
-                        </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-jms</artifactId>
+                <version>${spring.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.xbean</groupId>
                 <artifactId>xbean-spring</artifactId>
@@ -267,6 +267,17 @@
                 <version>${axis.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>net.sf.ehcache</groupId>
+                <artifactId>ehcache</artifactId>
+                <version>2.10.2</version>
+            </dependency>
+
+            <dependency>
+                <groupId>redis.clients</groupId>
+                <artifactId>jedis</artifactId>
+                <version>2.8.2</version>
+            </dependency>
 
 
         </dependencies>

+ 10 - 1
service/service.iml

@@ -23,10 +23,20 @@
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.1.3" level="project" />
     <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.1.3" level="project" />
+    <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.2" level="project" />
     <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
     <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
     <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:1.7.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:1.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.12.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.7" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.8.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.2" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.1.1" level="project" />
     <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.1" level="project" />
@@ -59,7 +69,6 @@
     <orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:1.1.0" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:1.4.0.RELEASE" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:1.4.0.RELEASE" level="project" />
-    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.7" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.7" level="project" />
     <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.7" level="project" />
     <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.17" level="project" />