From 2d79d7ef7519d33e149cc92f10d14c8be8bca27f Mon Sep 17 00:00:00 2001 From: lxyer <237809796@qq.com> Date: Fri, 7 Jun 2019 13:08:49 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=8D=87=E7=BA=A7jfinal=E5=88=B04.2?= =?UTF-8?q?=202=E3=80=81=E5=8D=87=E7=BA=A7=E5=A4=9A=E4=B8=AAjar=E5=8C=85?= =?UTF-8?q?=E5=88=B0=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 8 +- src/main/java/com/lxyer/config/DbMap.java | 2 +- src/main/java/com/lxyer/config/FlyConfig.java | 2 +- src/main/resources/config.properties | 1 + src/main/resources/ehcache.xsd | 422 ++++++++++++++++++ 5 files changed, 429 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/ehcache.xsd diff --git a/pom.xml b/pom.xml index 4bb0477..19944d8 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.jfinal jfinal - 3.3 + 4.2 @@ -25,7 +25,7 @@ com.zaxxer HikariCP - 2.7.4 + 3.3.1 @@ -39,12 +39,12 @@ redis.clients jedis - 2.9.0 + 3.0.1 de.ruedigermoeller fst - 2.48 + 2.57 org.javassist diff --git a/src/main/java/com/lxyer/config/DbMap.java b/src/main/java/com/lxyer/config/DbMap.java index 16a88cb..d457cfa 100644 --- a/src/main/java/com/lxyer/config/DbMap.java +++ b/src/main/java/com/lxyer/config/DbMap.java @@ -32,7 +32,7 @@ public class DbMap { public static void addSqlTemplate(ActiveRecordPlugin arp) { String baseSqlTemplatePath = PathKit.getWebRootPath() + "/WEB-INF/classes/sql/"; - arp.setBaseSqlTemplatePath(baseSqlTemplatePath); + arp.setBaseSqlTemplatePath("sql"); File sqlFiles = new File(baseSqlTemplatePath); File[] files = sqlFiles.listFiles(); diff --git a/src/main/java/com/lxyer/config/FlyConfig.java b/src/main/java/com/lxyer/config/FlyConfig.java index 4447b93..f33e25c 100644 --- a/src/main/java/com/lxyer/config/FlyConfig.java +++ b/src/main/java/com/lxyer/config/FlyConfig.java @@ -54,7 +54,7 @@ public class FlyConfig extends JFinalConfig { DbMap.mapping(arp); DbMap.addSqlTemplate(arp); - me.add(new RedisPlugin(getProperty("redis.cache_name"), getProperty("redis.host"), getPropertyToInt("redis.port"), getPropertyToInt("redis.timeout"))); + me.add(new RedisPlugin(getProperty("redis.cache_name"), getProperty("redis.host"), getPropertyToInt("redis.port"), getPropertyToInt("redis.timeout"), getProperty("redis.password"))); me.add(new EhCachePlugin()); } diff --git a/src/main/resources/config.properties b/src/main/resources/config.properties index a2ea0ad..8f8c68a 100644 --- a/src/main/resources/config.properties +++ b/src/main/resources/config.properties @@ -6,5 +6,6 @@ password=hello redis.cache_name=jfly redis.database=1 redis.host=dbserver +redis.password=hello redis.port=6379 redis.timeout=5000 \ No newline at end of file diff --git a/src/main/resources/ehcache.xsd b/src/main/resources/ehcache.xsd new file mode 100644 index 0000000..11144a6 --- /dev/null +++ b/src/main/resources/ehcache.xsd @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +