1 Star 0 Fork 56

TonyQian/zscat-platform

forked from 商城/zscat-platform 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
zscat-blog.sql 140.73 KB
一键复制 编辑 原始数据 按行查看 历史
shenzhuan 提交于 2018-12-02 21:43 . 后台管理系统
/*
Navicat MySQL Data Transfer
Source Server : local
Source Server Type : MySQL
Source Server Version : 50721
Source Host : localhost
Source Database : zscat-blog
Target Server Type : MySQL
Target Server Version : 50721
File Encoding : utf-8
Date: 12/02/2018 18:20:03 PM
*/
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for `article`
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`categoryId` int(11) NOT NULL COMMENT '分类Id',
`title` varchar(40) NOT NULL COMMENT '标题',
`content` longtext NOT NULL COMMENT '内容',
`description` varchar(500) NOT NULL COMMENT '文章简介 用于列表显示',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:正常 1:不可用',
`author` varchar(15) DEFAULT 'Coriger' COMMENT '作者',
`createTime` datetime NOT NULL COMMENT '发表时间',
`updateTime` datetime DEFAULT NULL COMMENT '发表时间',
`showCount` int(11) NOT NULL DEFAULT '0' COMMENT '浏览量',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=259221 DEFAULT CHARSET=utf8 COMMENT='文章表';
-- ----------------------------
-- Records of `article`
-- ----------------------------
BEGIN;
INSERT INTO `article` VALUES ('254090', '10001', 'ssh dubbo 分布式框架 带blog 和工作流', '<p>\n ssh dubbo 分布式框架 带blog 和工作流\n 视频教程https://pan.baidu.com/s/1dYvZ46\n<p>\n <img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2R_vKoVXXXXXqXXXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i3/2541510480/TB21faVoVXXXXXNXFXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2OXy.oVXXXXblXpXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2hYTjoVXXXXXLXpXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2o6G1oVXXXXcOXpXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i3/2541510480/TB2dDiUoVXXXXcUXpXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2KmWSoVXXXXXjXFXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2JSHqoVXXXXbSXXXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2vnYmoVXXXXcUXXXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2bkYioVXXXXXyXpXXXXXXXXXX_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2B8rboVXXXXaEXpXXXXXXXXXX_!!2541510480.png\" /></p>', 'ssh dubbo 分布式框架 带blog 和工作流', '1', 'Coriger', '2018-01-25 14:22:17', null, '0'), ('255062', '10000', 'springboot-dubbo 分布式商城', 'http://j2shop.tunnel.qydev.com/street/index http://j2shop.tunnel.qydev.com/login http://j2shop.tunnel.qydev.com/diaShop/index\n\n技术选型\n1、后端\n?核心框架:Spring Framework 4.0,kafka redis,mongodb,storm\n分布式框架: zookeeper dubbox2.8.4 分布式锁,springboot\n分布式调用链 zikpin brove jeeplus\n分布式日志分析 elk Elasticsearch,Logstash,Kibana\nElasticsearch,solr,luence:搜索,提供分布式全文搜索引擎\nLogstash: 日志收集,管理,存储\nKibana :日志的过滤web 展示\n分布式监控 dubbo-monitor dubbo-admin\nmq通信框架 kafka redis mongodb\n分库分表 sharding jdbc\n?安全框架:Apache Shiro 1.2\n?视图框架:Spring MVC 4.0\n?服务端验证:Hibernate Validator 5.1\n?任务调度:Spring Task 4.0\n?持久层框架:MyBatis 3.2\n?数据库连接池:Alibaba Druid 1.0\n?缓存框架:Ehcache 2.6、Redis\n?Luence搜索引擎\n?日志管理:SLF4J 1.7、Log4j2 logback\n?工具类:Apache Commons、Jackson 2.2、Xstream 1.4、Dozer 5.3、POI 3.9\n2、前端\n?JS框架:jQuery 1.9。\n?CSS框架:bootstrap ace admin框架界面。\n?客户端验证:JQuery Validation Plugin 1.11。\n?富文本:CKEcitor\n?文件管理:CKFinder\n?百度 web upload 图片上传插件手机端框架:Jingle\n?数据表格:jqGrid\n?对话框:jQuery jBox\n?下拉选择框:jQuery Select2\n?树结构控件:jQuery zTree\n?日期控件: My97DatePicker\nzscat\n├── sw-common -- SSM框架公共模块(kafka提供者)\n├── sw-mq -- 消息系统(已集成kafka)\n├── sw-storm -- storm系统(可以kafka,redis,hbase,mysql,mongodb数据)\n├── sw-schedule -- 分布式定时任务\n├── dubbo-cache-starter --dubbo自定义缓存(redis,ehcache,mixcache)\n├── app-monitor --dubbo服务监控和统计\n├── sw_manager -- 后台管理模板\n├── sw-portl -- 官网门户展示\n├── sw-search-- search管理系统(实现了luence,solr两种搜索)\n| ├── search-api -- search相关的service\n| ├── search-service -- search相关的service实现 dubbo服务\n| ├── search-web -- search消费者 前端展示\n├── sw-blog-- blog管理系统\n| ├── blog-api -- blog相关的service\n| ├── blog-service -- blog相关的service实现 dubbo服务\n| ├── blog-web -- blog消费者 前端展示\n├── sw-cms-- cms管理系统\n| ├── cms-api -- cms相关的service\n| ├── cms-service -- cms相关的service实现 dubbo服务\n| ├── cms-web -- cms消费者 前端展示\n├── sw-shop-- shop管理系统\n| ├── shop-goods-api -- shop商品相关的service\n| ├── shop-goods-service -- shop商品相关的service实现 dubbo服务\n| ├── shop-member-api -- shop会员相关的service\n| ├── shop-member-service -- shop会员相关的service实现 dubbo服务\n| ├── shop-order-api -- shop订单相关的service\n| ├── shop-order-service -- shop订单相关的service实现 dubbo服务\n| ├── shop-web -- shop消费者 前端展示\n| ├── shop-h5-- h5消费者 前端展示\n搜索模块具体介绍\n后台管理具体介绍\nblog管理具体介绍\ncms管理具体介绍\n商城管理具体介绍\nmq管理具体介绍\ndubbo缓存具体介绍\ndubbo监控和统计具体介绍\n1.项目部署,根据doc目录下的 zsboot.sql,weixin.sql,分别创建数据库,相关数据库配置 参考application.properties 先安装 spring-boot-starter-dubbo模块到本地 加群下载 zscat-tools.jar 解压运行zscat-tools 下面的run.bat 同时启动zookeep Redis nginx,默认配置 参考application.properties修改\n\n2.blog模块为例\na.启动blog-services下面的BlogServiceApplication主类,启动blog的dubbo服务\nb.启动blog-web下面的BlogWebApplication主类,访问 http://localhost:2001/front/blog/indexs\n3.cms模块为例\na.启动cms-services下面的cmsServiceApplication主类,启动blog的dubbo服务\nb.启动cms-web下面的cmsWebApplication主类,访问 http://localhost:2001/web/cms/index http://localhost:2001/wap/cms/index\n4.shop模块为例\na.启动shop-services下面的ShopServiceApplication主类,启动blog的dubbo服务\nb.启动shop-web下面的ShopWebApplication主类,访问 http://localhost:2007/front http://localhost:2007/youhong\nc.启动shop-h5下面的ShopWebApplication主类,访问 http://localhost:2006/wap1\n5.search模块为例\na.启动search-services下面的SearchServiceApplication主类,启动blog的dubbo服务\nb.启动search-web下面的SearchWebApplication主类,访问 http://localhost:2008\n \n', '基于springboot dubbo构建的一个商城项目,包括前端,后端和h5应用,作为zscat应用实践的模板项目。包含sso登录、API网关、流量控制、自定义协议包装、、自动crud、自动缓存、读写分离、分布式缓存、分布式定时任务、分布式锁、消息队列、事件机制、oauth2.0登录、全文搜索、集成qiniu文件服务、集成dubbo、集成springcboot等功能', '1', 'Coriger', '2018-01-25 13:29:56', null, '4'), ('255841', '10000', 'shop-dubbox分布式商城', '\n- 1、后端\n- 核心框架:Spring Framework 4.0\n- 分布式框架: zookeeper dubbox2.8.4 分布式锁\n- 分布式调用链 zikpin brove\n- 分布式日志分析 elk Elasticsearch,Logstash,Kibana \n- Elasticsearch:搜索,提供分布式全文搜索引擎\n-   Logstash: 日志收集,管理,存储\n-   Kibana :日志的过滤web 展示\n- 分布式监控 dubbo-monitor dubbo-admin\n- mq通信框架 kafka redis mongodb\n- 分库分表 sharding jdbc\n- - 安全框架:Apache Shiro 1.2\n \n- 视图框架:Spring MVC 4.0\n- 服务端验证:Hibernate Validator 5.1\n- 任务调度:Spring Task 4.0\n- 持久层框架:MyBatis 3.2\n- 数据库连接池:Alibaba Druid 1.0\n- 缓存框架:Ehcache 2.6、Redis\n- Luence搜索引擎\n- 日志管理:SLF4J 1.7、Log4j2 logback\n- 工具类:Apache Commons、Jackson 2.2、Xstream 1.4、Dozer 5.3、POI 3.9\n- 2、前端\n- JS框架:jQuery 1.9。\n- CSS框架:bootstrap ace admin框架界面。\n- 客户端验证:JQuery Validation Plugin 1.11。\n- 富文本:CKEcitor\n- 文件管理:CKFinder\n- 百度 web upload 图片上传插件手机端框架:Jingle\n- 数据表格:jqGrid\n- 对话框:jQuery jBox\n- 下拉选择框:jQuery Select2\n- 树结构控件:jQuery zTree\n- 日期控件: My97DatePicker\n\n已完成功能\n\n\n- 后台 用户管理 角色管理 菜单管理 组织管理 日志管理\n- 监控 jvm监控 ehcache监控 durid数据库监控\n- 商城 商品管理 首页菜单管理 楼层管理 商品类别 订单管理 文章管理\n- 商城前台 主页菜单 楼层 文章 商品展示,商品详情展示 ,购物 添加商品到购物车,结算 微信支付,支付宝支付。\n\n技术要点 \n\n\n- 登录用户的浏览记录存redis ,hash存储 一周过期\n- log4j2 通过配置直接将数据存入logstash ,然后通过elk展示分析\n\n待做功能\n\n\n- 用户登录或者注册送积分存入kafka,然后一个单独的项目消费kafka数据 ,将数据持久化到数据库\n- 日志数据存入mongodb\n\n\n此项目只是拆分了 商城 http://git.oschina.net/catshen/zsTrade \n\n\n- shop-admin 商城后台管理\n- shop-web 商城前台 (首页 支付 等)\n- shop-common 商城公共类 工具类等\n- shop-order-api 订单dubbox接口\n- shop-order 订单dubbox实现类 采用sharding jdbc 进行订单分库分表\n- shop-member-api 会员dubbox接口\n- shop-member 会员dubbox实现类 采用sharding jdbc 进行订单分库分表\n- shop-goods-api 商品dubbox接口\n- shop-goods 商品dubbox实现类 (商品,楼层 ,类别 品牌 等)\n\n演示地址\nhttp://zscat.top/\n使用技术和后台同 \nhttp://git.oschina.net/catshen/cat\n\n### 运行部署\n运行zscat-tools 下面的run.bat 同时启动zookeep redis nginx,默认配置 在app.properties修改\n### 1.修改shop-order模块下的app.properties 的数据库链接 ,运行Bootstrap类\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/100614_d296568c_134431.png \"在这里输入图片标题\")\n### 2.修改shop-member模块下的app.properties 的数据库链接 ,运行Bootstrap类\n\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/100614_d296568c_134431.png \"在这里输入图片标题\")\n\n### 3.修改shop-goods模块下的app.properties 的数据库链接 ,运行Bootstrap类\n\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/100627_9374930e_134431.png \"在这里输入图片标题\")\n\n### 4.用tomcat添加shop-admin,修改tomcat端口为4080 访问 http://localhost:4080/shop-admin/\n\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101032_1320272c_134431.png \"在这里输入图片标题\")\n商品管理\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101314_811d498c_134431.png \"在这里输入图片标题\")\n楼层管理\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101322_82a87832_134431.png \"在这里输入图片标题\")\n\n### 5.用tomcat添加shop-web, 访问 http://localhost:8080/shop-web/front\n\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101020_3545076d_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101514_9c2830ca_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101530_73ba9328_134431.png \"在这里输入图片标题\")\n\n\nbrave-dubbo.xml 采集数据到zikpin,生成分布式调研链数据\n **_启动zipkin_** \n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101932_4d1f56da_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/101956_c632c810_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/102006_e8778091_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0412/102015_2204af0a_134431.png \"在这里输入图片标题\")\n\n### 启动dubbo-montior\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0503/101233_d7915d97_791098.png \"在这里输入图片标题\")\nhttp://git.oschina.net/handu/dubbo-monitor\n启动dubbo-admin\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0503/101252_5a239aec_791098.png \"在这里输入图片标题\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200708_69a36cca_134431.png \"dubbo1.png\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200719_3bddc084_134431.png \"dubbo2.png\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200734_21fc3537_134431.png \"dubbo3.png\")\n启动elk\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0503/101306_d0720500_791098.png \"在这里输入图片标题\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0503/101315_fbfcd126_791098.png \"在这里输入图片标题\")\nsharding jdbc整合介绍\nhttp://blog.csdn.net/a1439226817/article/details/64437915\n\n下载地址 https://item.taobao.com/item.htm?ft=t&spm=2013.1.20141001.1.gkDDZC&id=541224695671&scm=1007.12144.81309.42296_0&pvid=3c458768-6a7b-41c7-a0c2-3af8280c6a74\n\nqq 951449465', '视频地址 https://pan.baidu.com/s/1jIZRvWq 已完成功能\n\n\n- 后台 用户管理 角色管理 菜单管理 组织管理 日志管理\n- 监控 jvm监控 ehcache监控 durid数据库监控\n- 商城 商品管理 首页菜单管理 楼层管理 商品类别 订单管理 文章管理\n- 商城前台 主页菜单 楼层 文章 商品展示,商品详情展示 ,购物 添加商品到购物车,结算 微信支付,支付宝支付。\n\n技术要点 \n\n\n- 登录用户的浏览记录存r', '1', 'Coriger', '2018-01-25 13:34:35', null, '2'), ('256884', '10001', 'zscat-小程序', '### **项目介绍** \n项目大概完成了商城后台,小程序所有页面和功能,wap的部分功能\n\n面向学习型的开源框架,简洁高效,减少过渡封装,展现技术本质\n\nSpringboot作为容器,使用mybatis作为持久层框架\n\n使用官方推荐的thymeleaf做为模板引擎,shiro作为安全框架,主流技术,“一网打尽”\n\n基于注解的sql写法,零XML,极简配置,一键前后台代码生成\n\n### **功能简介** \n\n\n1. 用户管理\n2. 角色管理\n3. 部门管理\n4. 菜单管理\n5. 系统日志\n6. 代码生成\n7.内容管理\n\n商城模块 (店铺管理,商品管理,类别管理,地址管理,专题管理,文章管理,banner管理,优惠劵管理,品牌管理,\n购物车管理,评论管理,我的收藏,楼层管理,分类管理,会员管理,订单管理 ,订单日志)\n\n### **所用框架** \n\n\n 前端 \n1. Bootstrap\n2. jQuery\n3. bootstrap-table\n4. layer\n5. jsTree \n\n后端\n1. SpringBoot \n2. MyBatis\n3. Thymeleaf\n4. Shiro\n\n1.项目部署,将bootdo.sql导入mysql,修改application-dev.yml文件的数据库信息,\n运行bootdo模块的 BootdoApplication类(直接点右键运行)\nhttp://localhost/login 后台 账号 admin admin\nhttp://localhost/taobao/login wap项目 账号 456789 456789\n\n2.创建小程序的账号,下载开发工具,然后导入项目webchatapp\n打开shell或cmd,进入ngrok目录,运行 `ngrok -config ngrok.cfg -subdomain zscat 80`\n然后运行小程序\n### 接口.md为 小程序的接口\n\n### 后台商城演示\n\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180334_51525b54_134431.png \"QQ图片20171025174621.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180346_f53edd7c_134431.png \"QQ图片20171025174635.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180355_eb20b1b5_134431.png \"QQ图片20171025174645.png\")\n\n### h5演示\n\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180412_b9755dfe_134431.png \"QQ图片20171025174652.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180420_94e11148_134431.png \"QQ图片20171025174658.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180432_b9f7b2b6_134431.png \"QQ图片20171025174707.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180440_833cce1d_134431.png \"QQ图片20171025174756.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180448_5c483b2a_134431.png \"QQ图片20171025174801.png\")\n\n### 小程序演示\n\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180507_0a581be2_134431.png \"QQ图片20171025175709.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180516_4d0e4ba6_134431.png \"QQ图片20171025175447.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180524_8d557d35_134431.png \"QQ图片20171025175453.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180532_961500d0_134431.png \"QQ图片20171025175458.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180541_cd4ec06c_134431.png \"QQ图片20171025175512.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180550_47dad79b_134431.png \"QQ图片20171025175517.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180604_3e71fb1b_134431.png \"QQ图片20171025175525.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180611_544d1da3_134431.png \"QQ图片20171025175552.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180619_ba8b1747_134431.png \"QQ图片20171025175559.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180626_5a8cad93_134431.png \"QQ图片20171025175603.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180634_c2b59ea8_134431.png \"QQ图片20171025175612.png\")\n![输入图片说明](https://gitee.com/uploads/images/2017/1025/180643_55227726_134431.png \"QQ图片20171025175620.png\")\n\n\n\n', '项目大概完成了商城后台,小程序所有页面和功能,wap的部分功能\n\n面向学习型的开源框架,简洁高效,减少过渡封装,展现技术本质\n\nSpringboot作为容器,使用mybatis作为持久层框架\n\n使用官方推荐的thymeleaf做为模板引擎,shiro作为安全框架,主流技术,“一网打尽”\n\n基于注解的sql写法,零XML,极简配置,一键前后台代码生成', '1', 'Coriger', '2018-01-25 13:33:00', null, '13'), ('257598', '10000', 'zsWing motan分布式框架', 'zscat-tool 一键启动nginx redis zookeep mq\nmaven 为我的的maven库\nmotan rpc管控平台\n下载群里motan_apache-tomcat-7.0.52.rar 解压 启动 tomcat\nhttp://localhost:8088/\n数据库配置\nwing-web\\src\\main\\resources\\config\\properties\\app.properties\n数据库文件 pig.sql\n\n部署motan监控motan服务\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0223/092025_51893329_134431.png \"在这里输入图片标题\")\n更新\n 添加kafka storm\n文档地址 http://git.oschina.net/catshen/zscatDocument\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122812_c0278625_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122847_c1c15724_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122910_6eb4beec_134431.png \"在这里输入图片标题\")\n 分布式框架架构设计\n1.架构截图\n\nApi接口 \n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013501_1f9f938e_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013511_b180d076_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013523_08038c7d_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013534_c978b065_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013544_d544ee61_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013557_01273477_134431.png \"在这里输入图片标题\")\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013608_4854e48f_134431.png \"在这里输入图片标题\")', 'zscat分布式框架的 motan版\nhttps://gitee.com/catshen/zsWing', '1', 'Coriger', '2018-01-25 15:46:21', null, '20'), ('258655', '10000', 'zscat-v2分布式框架', '部署dubboAdmin 监控dubbo服务\n![输入图片说明](http://git.oschina.net/uploads/images/2017/0221/165923_17cb6ef1_134431.png \"在这里输入图片标题\")\n\n更新\n 添加kafka storm\n文档地址 http://git.oschina.net/catshen/zscatDocument\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122812_c0278625_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122847_c1c15724_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/1029/122910_6eb4beec_134431.png \"在这里输入图片标题\")\n 分布式框架架构设计\n1.架构截图\n\nApi接口 \n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013501_1f9f938e_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013511_b180d076_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013523_08038c7d_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013534_c978b065_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013544_d544ee61_134431.png \"在这里输入图片标题\")\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013557_01273477_134431.png \"在这里输入图片标题\")\n\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200708_69a36cca_134431.png \"dubbo1.png\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200719_3bddc084_134431.png \"dubbo2.png\")\n![输入图片说明](https://git.oschina.net/uploads/images/2017/0718/200734_21fc3537_134431.png \"dubbo3.png\")\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013608_4854e48f_134431.png \"在这里输入图片标题\")\n\n\n\n\n\n\n\n\n\n\n打包命令 \n开发环境 mvn -P dev clean package -Dmaven.test.skip=true\n测试环境 mvn -P testclean package -Dmaven.test.skip=true\n生产环境 mvn -P uat clean package -Dmaven.test.skip=true\n\n\n\n2.分布式定时器\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013619_cbf3be05_134431.png \"在这里输入图片标题\")\n\n\n\n\n\n\n2.\n\n\n自定义工作流 主要是将流程分成节点跟路由,节点即具体动作,而路由为方向,流程流向。\n每一个流程树:节点——路由——节点——路由——结束 (节点和路由 都有权限控制)\n\n\n\n\n自定义表单 设计一个业务表的布局,流程节点的表单。\n流程跟表单都可以通过权限控制,可以具体到表单字段的增删改查。流程可以绑定事件,使流程的大体执行情况可以确定。(表单可以是单表,也可以是父子表)\n3.\n\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0226/013633_fd4a9e3e_134431.png \"在这里输入图片标题\")\n\n\n\n\n\n\n技术选型\n1、后端\n核心框架:Spring Framework 4.0\n 分布式框架: zookeeper dubbo 分布式锁\n安全框架:Apache Shiro 1.2\n视图框架:Spring MVC 4.0\n服务端验证:Hibernate Validator 5.1\n任务调度:Spring Task 4.0\n持久层框架:MyBatis 3.2\n数据库连接池:Alibaba Druid 1.0\n缓存框架:Ehcache 2.6、Redis\nLuence搜索引擎\n日志管理:SLF4J 1.7、Log4j logback\n工具类:Apache Commons、Jackson 2.2、Xstream 1.4、Dozer 5.3、POI 3.9\n2、前端\nJS框架:jQuery 1.9。\nCSS框架:bootstrap ace admin框架界面。\n客户端验证:JQuery Validation Plugin 1.11。\n富文本:CKEcitor\n文件管理:CKFinder\n百度 web upload 图片上传插件手机端框架:Jingle\n数据表格:jqGrid\n对话框:jQuery jBox\n下拉选择框:jQuery Select2\n树结构控件:jQuery zTree\n日期控件: My97DatePicker\n\n\n\n\n\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0514/232902_d1be466f_134431.png \"在这里输入图片标题\")\n\n![输入图片说明](http://git.oschina.net/uploads/images/2016/0514/232921_ff330f8c_134431.jpeg \"在这里输入图片标题\")\n\n\n\n\n\n设计者:zs\nqq:951449465', '视频地址 :https://pan.baidu.com/s/1bqsw4V1 zscat-v1的升级版 添加了blog cms 门户功能', '1', 'Coriger', '2018-01-25 13:37:47', null, '10'), ('259220', '10001', 'ssm商城', '<p>\n qq &nbsp;951449465\n 视频演示地址 https://pan.baidu.com/s/1dGsYx2L\n<div>\n dubbo 权限设计,spring,springmvc ,mybatis -plus\n<div>\n\n<div>\n\n</div>\n<p style=\"margin-left:42.0pt;text-indent:21.0pt;\">\n 开源分布式框架zsCat 559182393</p>\n<div>\n &nbsp;1.技术关键字&nbsp;如&nbsp;redis、dubbo&nbsp;等<br />\n 2.服务关键字&nbsp;如&nbsp;商品,商城,电商等<br />\n 3.关联关键字&nbsp;&nbsp;如分布式,购物网,外包,商城私活<br />\n 等&nbsp;</div>\n<p>\n <span style=\"font-family:宋体;font-size:10.5pt;\">zsCat&nbsp;<font face=\"宋体\">多用户 多商家模式商城</font></span><span style=\"font-family:宋体;font-size:10.5pt;\"></span></p>\n<p>\n <span style=\"font-family:宋体;font-size:10.5pt;\">java shiro Spring springmvc &nbsp;mybatis mybatis-plus &nbsp;redis rabbitmq</span><span style=\"font-size:10.5pt;line-height:1.5;font-family:宋体;\"><font face=\"宋体\">将服务提出来,预留</font></span><span style=\"font-size:10.5pt;line-height:1.5;font-family:宋体;\">dubbo&nbsp;<font face=\"宋体\">分布式服务结构</font></span></p>\n<p>\n <span style=\"font-size:10.5pt;line-height:1.5;font-family:宋体;\"><font face=\"宋体\"></font></span></p>\n<p>\n <span style=\"font-size:10.5pt;line-height:1.5;font-family:宋体;\"><font face=\"宋体\"></font></span></p>\n<p>\n <span style=\"font-size:10.5pt;line-height:1.5;font-family:宋体;\"><font face=\"宋体\"><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2CnxvXZwb61Bjy0FfXXXvlpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB27jdzX_ga61BjSspiXXXUSXXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2GDtvXZwb61Bjy0FfXXXvlpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB28X4yXZIa61Bjy0FiXXc1XpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2x3JAXZga61Bjy1XaXXafzVXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2zHxxXZsX61Bjy1XdXXa0aFXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2uzlyX_ga61BjSspfXXadSpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i3/2541510480/TB2f3FAXZga61Bjy1XaXXafzVXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2QENyX4IX61BjSsplXXazrpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i3/2541510480/TB2btdzX_gX61BjSspmXXaFcFXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i2/2541510480/TB2YwuqX4Ab61BjSZFBXXc9pFXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2TF8xX4oa61Bjy0FaXXcHwpXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i3/2541510480/TB2VUesX3Uc61BjSZFmXXbJHFXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2CAOrX4wb61BjSZFlXXbuoVXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i4/2541510480/TB2zUasX3Uc61BjSZFmXXbJHFXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2q01qXZkd61BjSZPhXXcb9VXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB2mfurX9Zb61BjSZPfXXaU.pXa_!!2541510480.png\" /><img align=\"absmiddle\" src=\"https://img.alicdn.com/imgextra/i1/2541510480/TB27JapX37c61BjSZFKXXb6hFXa_!!2541510480.png\" /></font></span></p>', '改造的webmall 商城为springmvc mybatis -plus', '1', 'Coriger', '2018-01-25 14:28:17', null, '2');
COMMIT;
-- ----------------------------
-- Table structure for `articletag`
-- ----------------------------
DROP TABLE IF EXISTS `articletag`;
CREATE TABLE `articletag` (
`articleId` int(11) NOT NULL COMMENT '文章Id',
`tagId` int(11) NOT NULL COMMENT '标签Id',
`tagName` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章标签中间表';
-- ----------------------------
-- Records of `articletag`
-- ----------------------------
BEGIN;
INSERT INTO `articletag` VALUES ('255062', '10001', 'springboot'), ('255062', '10002', 'dubbo'), ('255062', '10003', 'shop'), ('255062', '10004', 'zscat'), ('256884', '10001', 'springboot'), ('256884', '10002', 'dubbo'), ('255841', '10002', 'dubbo'), ('255841', '10003', 'shop'), ('258655', '10002', 'dubbo'), ('258655', '10004', 'zscat'), ('254090', '10002', 'dubbo'), ('254090', '10004', 'zscat'), ('259220', '10003', 'shop'), ('257598', '10008', 'motan');
COMMIT;
-- ----------------------------
-- Table structure for `blog_content`
-- ----------------------------
DROP TABLE IF EXISTS `blog_content`;
CREATE TABLE `blog_content` (
`cid` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL COMMENT '标题',
`slug` varchar(255) DEFAULT NULL,
`created` bigint(20) DEFAULT NULL COMMENT '创建人id',
`modified` bigint(20) DEFAULT NULL COMMENT '最近修改人id',
`content` text COMMENT '内容',
`type` varchar(16) DEFAULT NULL COMMENT '类型',
`tags` varchar(200) DEFAULT NULL COMMENT '标签',
`categories` varchar(200) DEFAULT NULL COMMENT '分类',
`hits` int(5) DEFAULT NULL,
`comments_num` int(5) DEFAULT '0' COMMENT '评论数量',
`allow_comment` int(1) DEFAULT '0' COMMENT '开启评论',
`allow_ping` int(1) DEFAULT '0' COMMENT '允许ping',
`allow_feed` int(1) DEFAULT '0' COMMENT '允许反馈',
`status` int(1) DEFAULT NULL COMMENT '状态',
`author` varchar(100) DEFAULT NULL COMMENT '作者',
`gtm_create` datetime DEFAULT NULL COMMENT '创建时间',
`gtm_modified` datetime DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`cid`)
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8 COMMENT='文章内容';
-- ----------------------------
-- Records of `blog_content`
-- ----------------------------
BEGIN;
INSERT INTO `blog_content` VALUES ('75', '基于 Springboot 和 Mybatis 的后台管理系统 zscat-platform', null, null, null, '<h3 style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif;\">项目介绍</h3><ul style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px 30px; list-style-position: initial; list-style-image: initial; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><li><p>面向学习型的开源框架,简洁高效,减少过渡封装,展现技术本质</p></li><li><p>Springboot作为基础框架,使用mybatis作为持久层框架</p></li><li><p>使用官方推荐的thymeleaf做为模板引擎,shiro作为安全框架,主流技术,“一网打尽”</p></li><li><p>基于注解的sql写法,零XML,极简配置,一键前后台代码生成</p></li></ul><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><span style=\"font-weight: bolder;\">演示地址</span>&nbsp;<a href=\"http://47.93.239.129/\" style=\"outline: 0px; color: rgb(68, 102, 187);\">http://47.93.239.129</a></p><h3 style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif;\">功能简介</h3><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\">1. 用户管理<br>2. 角色管理<br>3. 部门管理<br>4. 菜单管理<br>5. 系统日志<br>6. 代码生成<br>7. 内容管理</p><h3 style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif;\">所用框架</h3><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><span style=\"font-weight: bolder;\">前端</span><br>1. Bootstrap<br>2. jQuery<br>3. bootstrap-table<br>4. layer<br>5. jsTree&nbsp;<br>6. summernote<br>7. jquery-validate<br>8. jquery-treegrid</p><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><span style=\"font-weight: bolder;\">后端</span><br>1. SpringBoot&nbsp;<br>2. MyBatis<br>3. Thymeleaf<br>4. Shiro<br>5. druid</p><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><span style=\"font-weight: bolder;\">项目截图</span></p><p style=\"color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, sans-serif; font-size: 16px;\"><img height=\"400\" src=\"https://static.oschina.net/uploads/space/2017/0912/182421_5LaN_3244087.png\" width=\"650\" style=\"border-width: initial; border-style: none; outline: 0px; width: 882px; max-width: -webkit-fit-content; height: auto;\"></p>', 'article', null, null, null, null, '0', '0', '1', '1', 'bootdo', '2017-09-22 14:44:44', '2017-09-22 14:44:44'), ('100', 'springboot thymeleaf和shiro 整合——按钮可见性', null, null, null, '<p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">添加依赖</p><pre class=\"hljs xml\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; padding: 2px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 3px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">&lt;<span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">dependency</span>&gt;</span><code class=\"hljs xml\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; display: block; overflow-x: auto; padding: 10px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 4px; font-size: 13px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\"> \r\n <span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">groupId</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span>com.github.theborakompanioni<span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;/</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">groupId</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span>\r\n <span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">artifactId</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span>thymeleaf-extras-shiro<span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;/</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">artifactId</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span>\r\n <span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">version</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span></code>1.2.1<code class=\"hljs xml\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; display: block; overflow-x: auto; padding: 10px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 4px; font-size: 13px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;/</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">version</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span> \r\n<span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&lt;/</span><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\"><span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">dependency</span></span></span><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">&gt;</span></span></code></pre><p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">&nbsp;</p><p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">在shiro的configuration中配置</p><pre class=\"hljs java\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; padding: 2px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 3px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\"><span class=\"hljs-meta\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(127, 159, 127);\">@Bean</span>\r\n <span class=\"hljs-function\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\"><span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">public</span> ShiroDialect <span class=\"hljs-title\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">shiroDialect</span><span class=\"hljs-params\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">()</span> </span>{\r\n <span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">return</span> <span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">new</span> ShiroDialect();\r\n }</pre><p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">&nbsp;</p><p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">在html中加入xmlns</p><pre class=\"hljs xml\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; padding: 2px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 3px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\"><span class=\"hljs-tag\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">&lt;<span class=\"hljs-name\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(239, 239, 143);\">html</span> <span class=\"hljs-attr\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">lang</span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"zh_CN\"</span> <span class=\"hljs-attr\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">xmlns:th</span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"http://www.thymeleaf.org\"</span>\r\n <span class=\"hljs-attr\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\">xmlns:shiro</span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"http://www.pollix.at/thymeleaf/shiro\"</span>&gt;</span></pre><p style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; margin-bottom: 16px; color: rgb(61, 70, 77); font-family: &quot;Pingfang SC&quot;, STHeiti, &quot;Lantinghei SC&quot;, &quot;Open Sans&quot;, Arial, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, SimSun, sans-serif; font-size: 16px; background-color: rgb(248, 248, 248);\">例子</p><pre class=\"hljs scala\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; padding: 2px; background: rgb(63, 63, 63); color: rgb(220, 220, 220); border-radius: 3px; line-height: 1.4; word-wrap: normal; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace;\">&lt;button shiro:hasPermission=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"sys:user:add\"</span> <span class=\"hljs-class\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\"><span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">type</span></span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"button\"</span> <span class=\"hljs-class\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\"><span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">class</span></span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"btn &nbsp;btn-primary\"</span> onclick=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"add()\"</span>&gt;\r\n&nbsp;&nbsp; &lt;i <span class=\"hljs-class\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent;\"><span class=\"hljs-keyword\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(227, 206, 171);\">class</span></span>=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"fa fa-plus\"</span> aria-hidden=<span class=\"hljs-string\" style=\"box-sizing: inherit; -webkit-tap-highlight-color: transparent; color: rgb(204, 147, 147);\">\"true\"</span>&gt;&lt;/i&gt;添加\r\n&lt;/button&gt;</pre>', 'article', null, null, null, null, '1', null, '0', '1', 'bootdo', '2017-09-22 13:24:30', '2017-09-22 13:24:30'), ('108', 'spring boot ehcache整合', null, null, null, '<h3 id=\"pomxml配置-引入依赖包\" style=\"font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun; color: rgb(63, 63, 63); margin: 0.8em 0px; font-size: 1.7em; padding: 0px;\">pom.xml配置 引入依赖包</h3><pre class=\"prettyprint\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; font-size: 14px; white-space: nowrap; padding: 5px 5px 5px 60px; margin-bottom: 1.1em; line-height: 1.45; background-color: rgba(128, 128, 128, 0.05); border-color: rgba(128, 128, 128, 0.075); border-radius: 0px; position: relative; overflow-y: hidden;\"><code class=\"hljs xml has-numbering\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; white-space: pre; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; display: block; word-wrap: normal;\"><span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">dependency</span>&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">groupId</span>&gt;</span>org.springframework.boot<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">groupId</span>&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">artifactId</span>&gt;</span>spring-boot-starter-cache<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">artifactId</span>&gt;</span>\r\n<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">dependency</span>&gt;</span>\r\n<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">dependency</span>&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">groupId</span>&gt;</span>net.sf.ehcache<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">groupId</span>&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">artifactId</span>&gt;</span>ehcache<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">artifactId</span>&gt;</span>\r\n<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">dependency</span>&gt;</span></code><ul class=\"pre-numbering\" style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 6px 0px 40px; list-style: none; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; border-right: 1px solid rgb(221, 221, 221); text-align: right;\"><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">1</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">2</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">3</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">4</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">5</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">6</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">7</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">8</li></ul></pre><h3 id=\"编写配置类设置缓存机制\" style=\"font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun; color: rgb(63, 63, 63); margin: 0.8em 0px; font-size: 1.7em; padding: 0px;\">编写配置类,设置缓存机制</h3><pre class=\"prettyprint\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; font-size: 14px; white-space: nowrap; padding: 5px 5px 5px 60px; margin-bottom: 1.1em; line-height: 1.45; background-color: rgba(128, 128, 128, 0.05); border-color: rgba(128, 128, 128, 0.075); border-radius: 0px; position: relative; overflow-y: hidden;\"><code class=\"hljs java has-numbering\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; white-space: pre; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; display: block; word-wrap: normal;\"><span class=\"hljs-annotation\" style=\"margin: 0px; padding: 0px; color: rgb(155, 133, 157);\">@Configuration</span>\r\n<span class=\"hljs-annotation\" style=\"margin: 0px; padding: 0px; color: rgb(155, 133, 157);\">@EnableCaching</span>\r\n<span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">public</span> <span class=\"hljs-class\" style=\"margin: 0px; padding: 0px;\"><span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">class</span> <span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">CacheConfiguration</span> {</span>\r\n\r\n <span class=\"hljs-annotation\" style=\"margin: 0px; padding: 0px; color: rgb(155, 133, 157);\">@Bean</span>\r\n <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">public</span> EhCacheCacheManager <span class=\"hljs-title\" style=\"margin: 0px; padding: 0px;\">ehCacheCacheManager</span>(EhCacheManagerFactoryBean bean) {\r\n <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">return</span> <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">new</span> EhCacheCacheManager(bean.getObject());\r\n }\r\n\r\n <span class=\"hljs-annotation\" style=\"margin: 0px; padding: 0px; color: rgb(155, 133, 157);\">@Bean</span>\r\n <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">public</span> EhCacheManagerFactoryBean <span class=\"hljs-title\" style=\"margin: 0px; padding: 0px;\">ehCacheManagerFactoryBean</span>() {\r\n EhCacheManagerFactoryBean cacheManagerFactoryBean = <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">new</span> EhCacheManagerFactoryBean();\r\n cacheManagerFactoryBean.setConfigLocation(<span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">new</span> ClassPathResource(<span class=\"hljs-string\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"config/ehcache.xml\"</span>));\r\n cacheManagerFactoryBean.setShared(<span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">true</span>);\r\n <span class=\"hljs-keyword\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">return</span> cacheManagerFactoryBean;\r\n }\r\n}</code><ul class=\"pre-numbering\" style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 6px 0px 40px; list-style: none; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; border-right: 1px solid rgb(221, 221, 221); text-align: right;\"><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">1</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">2</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">3</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">4</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">5</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">6</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">7</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">8</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">9</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">10</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">11</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">12</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">13</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">14</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">15</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">16</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">17</li></ul></pre><p style=\"margin-bottom: 1.1em; padding: 0px; color: rgb(63, 63, 63); font-family: &quot;microsoft yahei&quot;; font-size: 15px;\">ehcache.xml配置:</p><pre class=\"prettyprint\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; font-size: 14px; white-space: nowrap; padding: 5px 5px 5px 60px; margin-bottom: 1.1em; line-height: 1.45; background-color: rgba(128, 128, 128, 0.05); border-color: rgba(128, 128, 128, 0.075); border-radius: 0px; position: relative; overflow-y: hidden;\"><code class=\"hljs xml has-numbering\" style=\"font-family: &quot;Source Code Pro&quot;, monospace; white-space: pre; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; display: block; word-wrap: normal;\"><span class=\"hljs-pi\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;</span>\r\n<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">ehcache</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">xmlns:xsi</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"http://www.w3.org/2001/XMLSchema-instance\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">xsi:noNamespaceSchemaLocation</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"http://ehcache.org/ehcache.xsd\"</span>\r\n <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">updateCheck</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span>&gt;</span>\r\n <span class=\"hljs-comment\" style=\"margin: 0px; padding: 0px; color: rgb(136, 0, 0);\">&lt;!-- diskStore:为缓存路径,ehcache分为内存和磁盘两级,此属性定义磁盘的缓存位置。\r\n 参数解释如下: user.home – 用户主目录 \r\n user.dir – 用户当前工作目录 \r\n java.io.tmpdir – 默认临时文件路径 --&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">diskStore</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">path</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"java.io.tmpdir/Tmp_EhCache\"</span> /&gt;</span>\r\n <span class=\"hljs-comment\" style=\"margin: 0px; padding: 0px; color: rgb(136, 0, 0);\">&lt;!-- defaultCache:默认缓存策略,当ehcache找不到定义的缓存时,则使用这个缓存策略。只能定义一个。 --&gt;</span>\r\n <span class=\"hljs-comment\" style=\"margin: 0px; padding: 0px; color: rgb(136, 0, 0);\">&lt;!-- name:缓存名称。 \r\n maxElementsInMemory:缓存最大数目\r\n maxElementsOnDisk:硬盘最大缓存个数。 \r\n eternal:对象是否永久有效,一但设置了,timeout将不起作用。 \r\n overflowToDisk:是否保存到磁盘,当系统当机时 \r\n timeToIdleSeconds:设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使 用,可选属性,默认值是0,也就是可闲置时间无穷大。\r\n timeToLiveSeconds:设置对象在失效前允许存活时间(单位:秒)。最大时间介于创建时间和失效时间之间。仅 当eternal=false对象不是永久有效时使用,默认是0.,也就是对象存活时间无穷大。 \r\n diskPersistent:是否缓存虚拟机重启期数据Whether the disk store persists between restarts \r\n of the Virtual Machine. The default value is false. \r\n diskSpoolBufferSizeMB:这个参数设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该 有自己的一个缓冲区。 \r\n diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是120秒。 \r\n memoryStoreEvictionPolicy:当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内 存。默认策略是LRU(最近最少使用)。\r\n 你可以设置为FIFO(先进先出)或是LFU(较少使用)。 \r\n clearOnFlush:内存数量最大时是否清除。\r\n memoryStoreEvictionPolicy:可选策略有:LRU(最近最少使用,默认策略)、FIFO(先进先出)、LFU(最少 访问次数)。 \r\n FIFO,first in first out,这个是大家最熟的,先进先出。\r\n LFU, Less Frequently Used,就是上面例子中使用的策略,直白一点就是讲一直以来最少被使用的。如上面 所讲,缓存的元素有一个hit属性,hit值最小的将会被清出缓存。 \r\n LRU,Least Recently Used,最近最少使用的,缓存的元素有一个时间戳,当缓存容量满了,而又需要腾出地 方来缓存新的元素的时候,\r\n 那么现有缓存元素中时间戳离当前时间最远的元素将被清出缓存。 --&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">defaultCache</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">eternal</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">maxElementsInMemory</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"1000\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">overflowToDisk</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">diskPersistent</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span>\r\n <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">timeToIdleSeconds</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"0\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">timeToLiveSeconds</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"600\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">memoryStoreEvictionPolicy</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"LRU\"</span> /&gt;</span>\r\n <span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">cache</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">name</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"snailAuthCache\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">eternal</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">maxElementsInMemory</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"10000\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">overflowToDisk</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">diskPersistent</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"false\"</span>\r\n <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">timeToIdleSeconds</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"0\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">timeToLiveSeconds</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"0\"</span> <span class=\"hljs-attribute\" style=\"margin: 0px; padding: 0px; color: rgb(102, 0, 102);\">memoryStoreEvictionPolicy</span>=<span class=\"hljs-value\" style=\"margin: 0px; padding: 0px; color: rgb(0, 136, 0);\">\"LFU\"</span> /&gt;</span>\r\n<span class=\"hljs-tag\" style=\"margin: 0px; padding: 0px; color: rgb(0, 102, 102);\">&lt;/<span class=\"hljs-title\" style=\"margin: 0px; padding: 0px; color: rgb(0, 0, 136);\">ehcache</span>&gt;</span></code><ul class=\"pre-numbering\" style=\"margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 6px 0px 40px; list-style: none; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; border-right: 1px solid rgb(221, 221, 221); text-align: right;\"><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">1</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">2</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">3</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">4</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">5</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">6</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">7</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">8</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">9</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">10</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">11</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">12</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">13</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">14</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">15</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">16</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">17</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">18</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">19</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">20</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">21</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">22</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">23</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">24</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">25</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">26</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">27</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">28</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">29</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">30</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">31</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">32</li><li style=\"margin: 0px; padding: 0px 5px; list-style: none; color: rgb(153, 153, 153);\">33</li></ul><div class=\"save_code tracking-ad\" data-mod=\"popu_249\" style=\"margin: 0px; padding: 0px; position: absolute; height: 60px; right: 30px; top: 5px; color: rgb(255, 255, 255); cursor: pointer; z-index: 2;\"><a style=\"color: rgb(202, 12, 22); margin: 0px; padding: 0px; outline: none;\"><img src=\"http://static.blog.csdn.net/images/save_snippets.png\" style=\"outline: none; max-width: 100%;\"></a></div></pre><h3 id=\"测试\" style=\"font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, SimHei, Arial, SimSun; color: rgb(63, 63, 63); margin: 0.8em 0px; font-size: 1.7em; padding: 0px;\"><br></h3>', 'article', null, null, null, null, '1', null, '0', '1', 'bootdo', '2017-09-22 17:48:29', '2017-09-22 17:48:29'), ('109', 'spring-boot整合ehcache实现缓存机制', null, null, null, '<p><br></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的CacheProvider。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  ehcache提供了多种缓存策略,主要分为内存和磁盘两级,所以无需担心容量问题。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  spring-boot是一个快速的集成框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  由于spring-boot无需任何样板化的配置文件,所以spring-boot集成一些其他框架时会有略微的不同。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  1.spring-boot是一个通过maven管理的jar包的框架,集成ehcache需要的依赖如下</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div><pre style=\"margin-bottom: 0px; line-height: 1.42857; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-context-support<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>net.sf.ehcache<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>ehcache<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>2.8.3<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span> </pre><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    具体pom.xml文件如下</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div><pre style=\"margin-bottom: 0px; line-height: 1.42857; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;?</span><span style=\"color: rgb(255, 0, 255); line-height: 1.5 !important;\">xml version=\"1.0\" encoding=\"UTF-8\"</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">?&gt;</span>\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">project </span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">xmlns</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"http://maven.apache.org/POM/4.0.0\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> xmlns:xsi</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"http://www.w3.org/2001/XMLSchema-instance\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">\r\n xsi:schemaLocation</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\"</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">modelVersion</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>4.0.0<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">modelVersion</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>com.lclc.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>boot-cache<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>0.0.1-SNAPSHOT<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">&lt;!--</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\"> Inherit defaults from Spring Boot </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">--&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">parent</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-boot-starter-parent<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>1.1.3.RELEASE<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">parent</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencies</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-boot-starter-web<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-boot-starter-data-jpa<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-boot-starter-thymeleaf<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n \r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>mysql<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>mysql-connector-java<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>com.google.guava<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>guava<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>17.0<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n \r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-context-support<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>net.sf.ehcache<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>ehcache<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>2.8.3<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">version</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependency</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencies</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencyManagement</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencies</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencies</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">dependencyManagement</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">build</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">plugins</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">plugin</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>org.springframework.boot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">groupId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-boot-maven-plugin<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">artifactId</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">plugin</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">plugins</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">build</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repositories</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-snapshots<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>http://repo.spring.io/snapshot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">snapshots</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">enabled</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>true<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">enabled</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">snapshots</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-milestones<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>http://repo.spring.io/milestone<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">repositories</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepositories</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-snapshots<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>http://repo.spring.io/snapshot<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>spring-milestones<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">id</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>http://repo.spring.io/milestone<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">url</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepository</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">pluginRepositories</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">project</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span></pre><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;  2.使用ehcache,我们需要一个ehcache.xml来定义一些cache的属性。</p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div><pre style=\"margin-bottom: 0px; line-height: 1.42857; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;?</span><span style=\"color: rgb(255, 0, 255); line-height: 1.5 !important;\">xml version=\"1.0\" encoding=\"UTF-8\"</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">?&gt;</span>\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">ehcache </span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">xmlns:xsi</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"http://www.w3.org/2001/XMLSchema-instance\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> xsi:noNamespaceSchemaLocation</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"http://ehcache.org/ehcache.xsd\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">\r\n updateCheck</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">diskStore </span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">path</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"java.io.tmpdir/Tmp_EhCache\"</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">/&gt;</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">defaultCache </span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">eternal</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> maxElementsInMemory</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"1000\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> overflowToDisk</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> diskPersistent</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">\r\n timeToIdleSeconds</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"0\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> timeToLiveSeconds</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"600\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> memoryStoreEvictionPolicy</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"LRU\"</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">/&gt;</span>\r\n\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">cache </span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">name</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"demo\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> eternal</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> maxElementsInMemory</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"100\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> overflowToDisk</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> diskPersistent</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"false\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\">\r\n timeToIdleSeconds</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"0\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> timeToLiveSeconds</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"300\"</span><span style=\"color: rgb(255, 0, 0); line-height: 1.5 !important;\"> memoryStoreEvictionPolicy</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">=\"LRU\"</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">/&gt;</span>\r\n\r\n<span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&lt;/</span><span style=\"color: rgb(128, 0, 0); line-height: 1.5 !important;\">ehcache</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">&gt;</span></pre><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;  解释下这个xml文件中的标签。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  (1).<span style=\"color: rgb(128, 0, 0);\">diskStore:</span>&nbsp;为缓存路径,ehcache分为内存和磁盘两级,此属性定义磁盘的缓存位置。参数解释如下:    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     user.home – 用户主目录<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      user.dir&nbsp; – 用户当前工作目录<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &nbsp; java.io.tmpdir – 默认临时文件路径</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  (2).<span style=\"color: rgb(128, 0, 0);\">defaultCache:<span style=\"color: rgb(0, 0, 0);\">默认缓存策略,当ehcache找不到定义的缓存时,则使用这个缓存策略。只能定义一个。</span></span></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\"><span style=\"color: rgb(128, 0, 0);\"><span style=\"color: rgb(0, 0, 0);\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (3).<span style=\"color: rgb(128, 0, 0);\">cache</span>:自定缓存策略,为自定义的缓存策略。参数解释如下:</span></span></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\"><span style=\"color: rgb(128, 0, 0);\"><span style=\"color: rgb(0, 0, 0);\">    cache元素的属性:&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name:缓存名称&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxElementsInMemory:内存中最大缓存对象数&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxElementsOnDisk:硬盘中最大缓存对象数,若是0表示无穷大&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eternal:true表示对象永不过期,此时会忽略timeToIdleSeconds和timeToLiveSeconds属性,默认为false &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overflowToDisk:true表示当内存缓存的对象数目达到了maxElementsInMemory界限后,会把溢出的对象写到硬盘缓存中。注意:如果缓存的对象要写入到硬盘中的话,则该对象必须实现了Serializable接口才行。&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskSpoolBufferSizeMB:磁盘缓存区大小,默认为30MB。每个Cache都应该有自己的一个缓存区。&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskPersistent:是否缓存虚拟机重启期数据&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认为120秒&nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToIdleSeconds: 设定允许对象处于空闲状态的最长时间,以秒为单位。当对象自从最近一次被访问后,如果处于空闲状态的时间超过了timeToIdleSeconds属性值,这个对象就会过期,EHCache将把它从缓存中清空。只有当eternal属性为false,该属性才有效。如果该属性值为0,则表示对象可以无限期地处于空闲状态&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToLiveSeconds:设定对象允许存在于缓存中的最长时间,以秒为单位。当对象自从被存放到缓存中后,如果处于缓存中的时间超过了 timeToLiveSeconds属性值,这个对象就会过期,EHCache将把它从缓存中清除。只有当eternal属性为false,该属性才有效。如果该属性值为0,则表示对象可以无限期地存在于缓存中。timeToLiveSeconds必须大于timeToIdleSeconds属性,才有意义&nbsp; &nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; memoryStoreEvictionPolicy:当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。可选策略有:LRU(最近最少使用,默认策略)、FIFO(先进先出)、LFU(最少访问次数)。&nbsp;&nbsp;</span></span></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\"><span style=\"color: rgb(128, 0, 0);\"><span style=\"color: rgb(0, 0, 0);\">  3.将ehcache的管理器暴露给spring的上下文容器,</span></span></p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\"><span style=\"color: rgb(128, 0, 0);\"><span style=\"color: rgb(0, 0, 0);\">  </span></span></p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div><pre style=\"margin-bottom: 0px; line-height: 1.42857; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">@Configuration\r\n</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">//</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\"> 标注启动了缓存</span>\r\n<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">@EnableCaching\r\n</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">class</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> CacheConfiguration {\r\n\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">/*</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">\r\n * ehcache 主要的管理器\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">*/</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">\r\n @Bean(name </span>= \"appEhCacheCacheManager\"<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">)\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> EhCacheCacheManager ehCacheCacheManager(EhCacheManagerFactoryBean bean){\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">return</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">new</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> EhCacheCacheManager (bean.getObject ());\r\n }\r\n\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">/*</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">\r\n * 据shared与否的设置,Spring分别通过CacheManager.create()或new CacheManager()方式来创建一个ehcache基地.\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">*/</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">\r\n @Bean\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> EhCacheManagerFactoryBean ehCacheManagerFactoryBean(){\r\n EhCacheManagerFactoryBean cacheManagerFactoryBean </span>= <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">new</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> EhCacheManagerFactoryBean ();\r\n cacheManagerFactoryBean.setConfigLocation (</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">new</span> ClassPathResource (\"conf/ehcache-app.xml\"<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">));\r\n cacheManagerFactoryBean.setShared (</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">true</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">);\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">return</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> cacheManagerFactoryBean;\r\n }\r\n}</span></pre><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;&nbsp;     <span style=\"color: rgb(0, 0, 0);\">@Configuration</span>:为spring-boot注解,主要标注此为配置类,优先扫描。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;     <span style=\"color: rgb(0, 0, 0);\">@Bean</span>:向spring容器中加入bean。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  至此所有的配置都做好了,通过spring-boot进行集成框架就是这么简单。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  4.使用ehcache</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    使用ehcache主要通过spring的缓存机制,上面我们将spring的缓存机制使用了ehcache进行实现,所以使用方面就完全使用spring缓存机制就行了。<br>    具体牵扯到几个注解:</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    @Cacheable:负责将方法的返回值加入到缓存中,参数3<br>    @CacheEvict:负责清除缓存,参数4</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">     参数解释:</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    value:缓存位置名称,不能为空,如果使用EHCache,就是ehcache.xml中声明的cache的name<br>    key:缓存的key,默认为空,既表示使用方法的参数类型及参数值作为key,支持SpEL<br>    condition:触发条件,只有满足条件的情况才会加入缓存,默认为空,既表示全部都加入缓存,支持SpEL</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    allEntries:CacheEvict参数,true表示清除value中的全部缓存,默认为false</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  不多说,直接上代码:</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">  </p><div class=\"cnblogs_code\" style=\"background-color: rgb(245, 245, 245); border: 1px solid rgb(204, 204, 204); padding: 5px; overflow: auto; margin: 5px 0px; color: rgb(0, 0, 0); font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div><pre style=\"margin-bottom: 0px; line-height: 1.42857; font-family: &quot;Courier New&quot; !important; font-size: 12px !important;\"><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">@Service\r\n</span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">class</span> CacheDemoServiceImpl <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">implements</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> CacheDemoService {\r\n\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">/**</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">\r\n * 缓存的key\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">*/</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">static</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">final</span> String THING_ALL_KEY = \"\\\"thing_all\\\"\"<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">;\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">/**</span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">\r\n * value属性表示使用哪个缓存策略,缓存策略在ehcache.xml\r\n </span><span style=\"color: rgb(0, 128, 0); line-height: 1.5 !important;\">*/</span>\r\n <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">static</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">final</span> String DEMO_CACHE_NAME = \"demo\"<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">;\r\n \r\n @CacheEvict(value </span>= DEMO_CACHE_NAME,key =<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> THING_ALL_KEY)\r\n @Override\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">void</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> create(Thing thing){\r\n Long id </span>=<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> getNextId ();\r\n thing.setId (id);\r\n data.put (id, thing);\r\n } \r\n \r\n @Cacheable(value </span>=<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> DEMO_CACHE_NAME,key = \"#thing.getId()+\'thing\'\")\r\n @Override\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> Thing findById(Long id){\r\n System.err.println (</span>\"没有走缓存!\" +<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> id);\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">return</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> data.get (id);\r\n }\r\n\r\n @Cacheable(value </span>= DEMO_CACHE_NAME,key =<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> THING_ALL_KEY)\r\n @Override\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> List&lt;Thing&gt;<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> findAll(){\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">return</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> Lists.newArrayList (data.values ());\r\n }\r\n \r\n </span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">\r\n @Override\r\n @CachePut(value </span>= DEMO_CACHE_NAME,key = \"#thing.getId()+\'thing\'\"<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\">)\r\n @CacheEvict(value </span>= DEMO_CACHE_NAME,key =<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> THING_ALL_KEY)\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> Thing update(Thing thing){\r\n System.out.println (thing);\r\n data.put (thing.getId (), thing);\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">return</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> thing;\r\n }\r\n\r\n @CacheEvict(value </span>=<span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> DEMO_CACHE_NAME)\r\n @Override\r\n </span><span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">public</span> <span style=\"color: rgb(0, 0, 255); line-height: 1.5 !important;\">void</span><span style=\"color: rgb(0, 0, 0); line-height: 1.5 !important;\"> delete(Long id){\r\n data.remove (id);\r\n }\r\n \r\n}</span></pre><div class=\"cnblogs_code_toolbar\" style=\"margin-top: 5px;\"><span class=\"cnblogs_code_copy\" style=\"padding-right: 5px; line-height: 1.5 !important;\"><a title=\"复制代码\" style=\"color: rgb(86, 182, 233); background-color: rgb(245, 245, 245) !important; border: none !important;\"><img src=\"http://common.cnblogs.com/images/copycode.gif\" alt=\"复制代码\" style=\"max-width: 900px; border-width: initial !important; border-style: none !important;\"></a></span></div></div><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">    5.只需要通过注解在service层方法上打注解便可以使用缓存,在find**上存入缓存,在delete**,update**上清除缓存。</p><p style=\"margin-top: 10px; margin-right: auto; margin-left: auto; color: rgb(35, 35, 35); font-family: Verdana, Arial, helvetica, sans-seriff; font-size: 14px;\">&nbsp;</p>', 'article', null, null, null, null, '1', null, '0', '1', 'bootdo', '2017-09-24 11:15:18', '2017-09-24 11:15:18');
INSERT INTO `blog_content` VALUES ('110', 'qiniu', null, null, null, '<p>1111</p>', 'article', null, '', null, null, '1', null, '0', '1', '111', '2017-12-01 20:57:34', '2017-12-01 20:57:34'), ('111', 'qiniu2', null, null, null, '<p>qqq<img src=\"http://of8rkrh1w.bkt.clouddn.com/2017/12/1/QQ截图20170520154238.png\" style=\"width: 800px;\"><img src=\"http://of8rkrh1w.bkt.clouddn.com/2017/12/1/QQ截图20170520154213.png\" style=\"width: 750px;\"></p>', 'article', null, 'qq', null, null, '1', null, '0', '1', 'qq', '2017-12-01 20:59:49', '2017-12-01 20:59:49');
COMMIT;
-- ----------------------------
-- Table structure for `category`
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`categoryName` varchar(20) NOT NULL COMMENT '分类名称 唯一',
`aliasName` varchar(20) NOT NULL COMMENT '别名 唯一 比如新闻 就用News 代替 栏目Id不显示在url中',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序 (0-10)',
PRIMARY KEY (`id`),
UNIQUE KEY `aliasName_UNIQUE` (`aliasName`),
UNIQUE KEY `categoryName_UNIQUE` (`categoryName`)
) ENGINE=InnoDB AUTO_INCREMENT=10003 DEFAULT CHARSET=utf8 COMMENT='分类表 只支持一级分类 如果需要分多个层次 用标签来协助实现';
-- ----------------------------
-- Records of `category`
-- ----------------------------
BEGIN;
INSERT INTO `category` VALUES ('9999', '未分类', 'default', '0'), ('10000', 'ssm', 'mybatis-springmvc', '1'), ('10001', 'java', 'java', '1'), ('10002', 'python', 'python', '2');
COMMIT;
-- ----------------------------
-- Table structure for `partner`
-- ----------------------------
DROP TABLE IF EXISTS `partner`;
CREATE TABLE `partner` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`siteName` varchar(15) NOT NULL COMMENT '站点名',
`siteUrl` varchar(45) NOT NULL COMMENT '站点地址',
`siteDesc` varchar(45) NOT NULL COMMENT '站点描述 简单备注 ',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='合作伙伴';
-- ----------------------------
-- Records of `partner`
-- ----------------------------
BEGIN;
INSERT INTO `partner` VALUES ('1', 'zscat | csdn', 'http://blog.csdn.net/a1439226817', 'zscat的CSDN博客', '1'), ('2', 'zscat | github', 'https://github.com/shenzhuan/reposi', 'zscat的GitHub', '1');
COMMIT;
-- ----------------------------
-- Table structure for `tag`
-- ----------------------------
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tagName` varchar(25) NOT NULL COMMENT '标签名称 唯一',
`aliasName` varchar(20) NOT NULL COMMENT '标签别名 唯一',
PRIMARY KEY (`id`),
UNIQUE KEY `tagName_UNIQUE` (`tagName`)
) ENGINE=InnoDB AUTO_INCREMENT=10009 DEFAULT CHARSET=utf8 COMMENT='标签表';
-- ----------------------------
-- Records of `tag`
-- ----------------------------
BEGIN;
INSERT INTO `tag` VALUES ('9999', 'default', 'default'), ('10001', 'springboot', 'springboot'), ('10002', 'dubbo', 'dubbo'), ('10003', 'shop', '商城'), ('10004', 'zscat', 'zscat分布式框架'), ('10005', 'redis', 'redis'), ('10006', 'mongodb', 'mongodb'), ('10007', 'rabbitmq', 'rabbitmq'), ('10008', 'motan', 'motan');
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/shiziqian1234/zscat-platform.git
git@gitee.com:shiziqian1234/zscat-platform.git
shiziqian1234
zscat-platform
zscat-platform
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385