ehcache入门基础示例
一:目录
- EhCache 简介
- Hello World 示例
- Spring 整合
二: 简介
1. 基本介绍
EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认CacheProvider。Ehcache是一种广泛使用的开源Java分布式缓存。主要面向通用缓存,Java EE和轻量级容器。它具有内存和磁盘存储,缓存加载器,缓存扩展,缓存异常处理程序,一个gzip缓存servlet过滤器,支持REST和SOAP api等特点。
Spring 提供了对缓存功能的抽象:即允许绑定不同的缓存解决方案(如Ehcache),但本身不直接提供缓存功能的实现。它支持注解方式使用缓存,非常方便。
2. 主要的特性有:
- 快速
- 简单
- 多种缓存策略
- 缓存数据有两级:内存和磁盘,因此无需担心容量问题
- 缓存数据会在虚拟机重启的过程中写入磁盘
- 可以通过RMI、可插入API等方式进行分布式缓存
- 具有缓存和缓存管理器的侦听接口
- 支持多缓存管理器实例,以及一个实例的多个缓存区域
- 提供Hibernate的缓存实现
3. 集成
可以单独使用,一般在第三方库中被用到的比较多(如mybatis、shiro等)ehcache 对分布式支持不够好,多个节点不能同步,通常和redis一块使用
4. ehcache 和 redis 比较
ehcache直接在jvm虚拟机中缓存,速度快,效率高;但是缓存共享麻烦,集群分布式应用不方便。
redis是通过socket访问到缓存服务,效率比ecache低,比数据库要快很多,
处理集群和分布式缓存方便,有成熟的方案。如果是单个应用或者对缓存访问要求很高的应用,用ehcache。如果是大型系统,存在缓存共享、分布式部署、缓存内容很大的,建议用redis。
ehcache也有缓存共享方案,不过是通过RMI或者Jgroup多播方式进行广播缓存通知更新,缓存共享复杂,维护不方便;简单的共享可以,但是涉及到缓存恢复,大数据缓存,则不合适。
三: Hello World
1、在pom.xml中引入依赖
<dependency><groupId>net.sf.ehcache</groupId><artifactId>ehcache</artifactId><version>2.10.2</version>
</dependency>
2、在src/main/resources/创建一个配置文件 ehcache.xml
默认情况下Ehcache会自动加载classpath根目录下名为ehcache.xml文件,也可以将该文件放到其他地方在使用时指定文件的位置
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"><!-- 磁盘缓存位置 --><diskStore path="java.io.tmpdir/ehcache"/><!-- 默认缓存 --><defaultCachemaxEntriesLocalHeap="10000"eternal="false"timeToIdleSeconds="120"timeToLiveSeconds="120"maxEntriesLocalDisk="10000000"diskExpiryThreadIntervalSeconds="120"memoryStoreEvictionPolicy="LRU"><persistence strategy="localTempSwap"/></defaultCache><!-- helloworld缓存 --><cache name="HelloWorldCache"maxElementsInMemory="1000"eternal="false"timeToIdleSeconds="5"timeToLiveSeconds="5"overflowToDisk="false"memoryStoreEvictionPolicy="LRU"/>
</ehcache>
3、测试类
package com.mengdee.manage.cache;import com.mengdee.manage.entity.Dog;import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;public class CacheTest {public static void main(String[] args) {// 1. 创建缓存管理器CacheManager cacheManager = CacheManager.create("./src/main/resources/ehcache.xml");// 2. 获取缓存对象Cache cache = cacheManager.getCache("HelloWorldCache");// 3. 创建元素Element element = new Element("key1", "value1");// 4. 将元素添加到缓存cache.put(element);// 5. 获取缓存Element value = cache.get("key1");System.out.println(value);System.out.println(value.getObjectValue());// 6. 删除元素cache.remove("key1");Dog dog = new Dog(1L, "taidi", (short)2);Element element2 = new Element("taidi", dog);cache.put(element2);Element value2 = cache.get("taidi");Dog dog2 = (Dog) value2.getObjectValue();System.out.println(dog2);System.out.println(cache.getSize());// 7. 刷新缓存cache.flush();// 8. 关闭缓存管理器cacheManager.shutdown();}
}
4、缓存配置
一:xml配置方式:
diskStore : ehcache支持内存和磁盘两种存储
- path :指定磁盘存储的位置
defaultCache : 默认的缓存
- maxEntriesLocalHeap=”10000”
- eternal=”false”
- timeToIdleSeconds=”120”
- timeToLiveSeconds=”120”
- maxEntriesLocalDisk=”10000000”
- diskExpiryThreadIntervalSeconds=”120”
- memoryStoreEvictionPolicy=”LRU”
cache :自定的缓存,当自定的配置不满足实际情况时可以通过自定义(可以包含多个cache节点)
name : 缓存的名称,可以通过指定名称获取指定的某个Cache对象
maxElementsInMemory :内存中允许存储的最大的元素个数,0代表无限个
clearOnFlush:内存数量最大时是否清除。
eternal :设置缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期。根据存储数据的不同,例如一些静态不变的数据如省市区等可以设置为永不过时
timeToIdleSeconds : 设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。
timeToLiveSeconds :缓存数据的生存时间(TTL),也就是一个元素从构建到消亡的最大时间间隔值,这只能在元素不是永久驻留时有效,如果该值是0就意味着元素可以停顿无穷长的时间。
overflowToDisk :内存不足时,是否启用磁盘缓存。
maxEntriesLocalDisk:当内存中对象数量达到maxElementsInMemory时,Ehcache将会对象写到磁盘中。
maxElementsOnDisk:硬盘最大缓存个数。
diskSpoolBufferSizeMB:这个参数设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区。
diskPersistent:是否在VM重启时存储硬盘的缓存数据。默认值是false。
diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是120秒。
二:编程方式配置
Cache cache = manager.getCache("mycache");
CacheConfiguration config = cache.getCacheConfiguration();
config.setTimeToIdleSeconds(60);
config.setTimeToLiveSeconds(120);
config.setmaxEntriesLocalHeap(10000);
config.setmaxEntriesLocalDisk(1000000);
5、Ehcache API
- CacheManager:Cache的容器对象,并管理着(添加或删除)Cache的生命周期。
// 可以自己创建一个Cache对象添加到CacheManager中
public void addCache(Cache cache);
public synchronized void removeCache(String cacheName);
Cache: 一个Cache可以包含多个Element,并被CacheManager管理。它实现了对缓存的逻辑行为
Element:需要缓存的元素,它维护着一个键值对, 元素也可以设置有效期,0代表无限制
获取CacheManager的方式:
可以通过create()或者newInstance()方法或重载方法来创建获取CacheManager的方式:
public static CacheManager create();
public static CacheManager create(String configurationFileName);
public static CacheManager create(InputStream inputStream);
public static CacheManager create(URL configurationFileURL);public static CacheManager newInstance();
Ehcache的CacheManager构造函数或工厂方法被调用时,会默认加载classpath下名为ehcache.xml的配置文件。
如果加载失败,会加载Ehcache jar包中的ehcache-failsafe.xml文件,这个文件中含有简单的默认配置。
// CacheManager.create() == CacheManager.create("./src/main/resources/ehcache.xml")
// 使用Ehcache默认配置新建一个CacheManager实例
CacheManager cacheManager = CacheManager.create();
cacheManager = CacheManager.newInstance();cacheManager = CacheManager.newInstance("./src/main/resources/ehcache.xml");InputStream inputStream = new FileInputStream(new File("./src/main/resources/ehcache.xml"));
cacheManager = CacheManager.newInstance(inputStream);String[] cacheNames = cacheManager.getCacheNames(); // [HelloWorldCache]
四:Spring整合
示例结构:
1. pom.xml 引入spring和ehcache
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.mengdee</groupId><artifactId>ehcache</artifactId><version>0.0.1-SNAPSHOT</version><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><junit.version>4.10</junit.version><spring.version>4.2.3.RELEASE</spring.version></properties><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>${junit.version}</version><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${spring.version}</version><scope>test</scope></dependency><!-- springframework --><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-core</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId><version>${spring.version}</version></dependency><dependency><groupId>net.sf.ehcache</groupId><artifactId>ehcache</artifactId><version>2.10.3</version></dependency></dependencies><repositories><repository><id>aliyun</id><name>aliyun</name><url>http://maven.aliyun.com/nexus/content/groups/public</url></repository></repositories>
</project>
2. 在src/main/resources添加ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"><!-- 磁盘缓存位置 --><diskStore path="java.io.tmpdir/ehcache" /><!-- 默认缓存 --><defaultCachemaxEntriesLocalHeap="10000"eternal="false"timeToIdleSeconds="120"timeToLiveSeconds="120"maxEntriesLocalDisk="10000000"diskExpiryThreadIntervalSeconds="120"memoryStoreEvictionPolicy="LRU"><persistence strategy="localTempSwap"/></defaultCache><!-- helloworld缓存 --><cache name="HelloWorldCache"maxElementsInMemory="1000"eternal="false"timeToIdleSeconds="5"timeToLiveSeconds="5"overflowToDisk="false"memoryStoreEvictionPolicy="LRU"/><cache name="UserCache"maxElementsInMemory="1000"eternal="false"timeToIdleSeconds="1800"timeToLiveSeconds="1800"overflowToDisk="false"memoryStoreEvictionPolicy="LRU"/>
</ehcache>
3. 在src/main/resources/conf/spring中配置spring-base.xml和spring-ehcache.xml
spring-base.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"><context:component-scan base-package="com.mengdee.**.dao,com.mengdee.**.service"/>
</beans>
spring-ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:cache="http://www.springframework.org/schema/cache"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/cachehttp://www.springframework.org/schema/cache/spring-cache-3.2.xsd"><description>ehcache缓存配置管理文件</description><!-- 启用缓存注解开关 --><cache:annotation-driven cache-manager="cacheManager"/><bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"><property name="cacheManager" ref="ehcache"/></bean><bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"><property name="configLocation" value="classpath:ehcache.xml"/></bean></beans>
4、在src/main/java/com.mengdee.manager.service/下 创建EhcacheService和EhcacheServiceImpl
EhcacheService
package com.mengdee.manager.service;import com.mengdee.manager.entity.User;public interface EhcacheService {// 测试失效情况,有效期为5秒public String getTimestamp(String param);public String getDataFromDB(String key);public void removeDataAtDB(String key);public String refreshData(String key);public User findById(String userId);public boolean isReserved(String userId);public void removeUser(String userId);public void removeAllUser();
}
EhcacheServiceImpl:
package com.mengdee.manager.service;import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;import com.mengdee.manager.entity.User;@Service
public class EhcacheServiceImpl implements EhcacheService{// value的值和ehcache.xml中的配置保持一致@Cacheable(value="HelloWorldCache", key="#param")@Overridepublic String getTimestamp(String param) {Long timestamp = System.currentTimeMillis();return timestamp.toString();}@Cacheable(value="HelloWorldCache", key="#key")@Overridepublic String getDataFromDB(String key) {System.out.println("从数据库中获取数据...");return key + ":" + String.valueOf(Math.round(Math.random()*1000000));}@CacheEvict(value="HelloWorldCache", key="#key")@Overridepublic void removeDataAtDB(String key) {System.out.println("从数据库中删除数据");}@CachePut(value="HelloWorldCache", key="#key")@Overridepublic String refreshData(String key) {System.out.println("模拟从数据库中加载数据");return key + "::" + String.valueOf(Math.round(Math.random()*1000000));}// ------------------------------------------------------------------------@Cacheable(value="UserCache", key="'user:' + #userId") public User findById(String userId) { System.out.println("模拟从数据库中查询数据");return (User) new User("1", "mengdee"); } @Cacheable(value="UserCache", condition="#userId.length()<12") public boolean isReserved(String userId) { System.out.println("UserCache:"+userId); return false; }//清除掉UserCache中某个指定key的缓存 @CacheEvict(value="UserCache",key="'user:' + #userId") public void removeUser(String userId) { System.out.println("UserCache remove:"+ userId); } //清除掉UserCache中全部的缓存 @CacheEvict(value="UserCache", allEntries=true) public void removeAllUser() { System.out.println("UserCache delete all"); }
}
注解基本使用方法
Spring对缓存的支持类似于对事务的支持。
首先使用注解标记方法,相当于定义了切点,然后使用Aop技术在这个方法的调用前、调用后获取方法的入参和返回值,进而实现了缓存的逻辑。
@Cacheable
表明所修饰的方法是可以缓存的:当第一次调用这个方法时,它的结果会被缓存下来,在缓存的有效时间内,以后访问这个方法都直接返回缓存结果,不再执行方法中的代码段。
这个注解可以用condition属性来设置条件,如果不满足条件,就不使用缓存能力,直接执行方法。
可以使用key属性来指定key的生成规则。
@Cacheable 支持如下几个参数:
- value:缓存位置名称,不能为空,如果使用EHCache,就是ehcache.xml中声明的cache的name, 指明将值缓存到哪个Cache中
key:缓存的key,默认为空,既表示使用方法的参数类型及参数值作为key,支持SpEL,如果要引用参数值使用井号加参数名,如:#userId,
一般来说,我们的更新操作只需要刷新缓存中某一个值,所以定义缓存的key值的方式就很重要,最好是能够唯一,因为这样可以准确的清除掉特定的缓存,而不会影响到其它缓存值 ,
本例子中使用实体加冒号再加ID组合成键的名称,如”user:1”、”order:223123”等- condition:触发条件,只有满足条件的情况才会加入缓存,默认为空,既表示全部都加入缓存,支持SpEL
// 将缓存保存到名称为UserCache中,键为"user:"字符串加上userId值,如 'user:1'
@Cacheable(value="UserCache", key="'user:' + #userId")
public User findById(String userId) { return (User) new User("1", "mengdee");
} // 将缓存保存进UserCache中,并当参数userId的长度小于12时才保存进缓存,默认使用参数值及类型作为缓存的key
// 保存缓存需要指定key,value, value的数据类型,不指定key默认和参数名一样如:"1"
@Cacheable(value="UserCache", condition="#userId.length() < 12")
public boolean isReserved(String userId) { System.out.println("UserCache:"+userId); return false;
}
@CachePut
与@Cacheable不同,@CachePut不仅会缓存方法的结果,还会执行方法的代码段。它支持的属性和用法都与@Cacheable一致。
@CacheEvict
与@Cacheable功能相反,@CacheEvict表明所修饰的方法是用来删除失效或无用的缓存数据。
@CacheEvict 支持如下几个参数:
- value:缓存位置名称,不能为空,同上
- key:缓存的key,默认为空,同上
- condition:触发条件,只有满足条件的情况才会清除缓存,默认为空,支持SpEL
- allEntries:true表示清除value中的全部缓存,默认为false
//清除掉UserCache中某个指定key的缓存
@CacheEvict(value="UserCache",key="'user:' + #userId")
public void removeUser(User user) { System.out.println("UserCache"+user.getUserId());
} //清除掉UserCache中全部的缓存
@CacheEvict(value="UserCache", allEntries=true)
public final void setReservedUsers(String[] reservedUsers) { System.out.println("UserCache deleteall");
}
5、测试
SpringTestCase
package com.mengdee.manager;import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;@ContextConfiguration(locations = {"classpath:conf/spring/spring-*.xml"})
@RunWith(SpringJUnit4ClassRunner.class)
public class SpringTestCase extends AbstractJUnit4SpringContextTests{}
package com.mengdee.manager;import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;import com.mengdee.manager.service.EhcacheService;public class EhcacheServiceTest extends SpringTestCase{@Autowiredprivate EhcacheService ehcacheService;// 有效时间是5秒,第一次和第二次获取的值是一样的,因第三次是5秒之后所以会获取新的值@Testpublic void testTimestamp() throws InterruptedException{System.out.println("第一次调用:" + ehcacheService.getTimestamp("param"));Thread.sleep(2000);System.out.println("2秒之后调用:" + ehcacheService.getTimestamp("param"));Thread.sleep(4000);System.out.println("再过4秒之后调用:" + ehcacheService.getTimestamp("param"));}@Testpublic void testCache(){String key = "zhangsan";String value = ehcacheService.getDataFromDB(key); // 从数据库中获取数据...ehcacheService.getDataFromDB(key); // 从缓存中获取数据,所以不执行该方法体ehcacheService.removeDataAtDB(key); // 从数据库中删除数据ehcacheService.getDataFromDB(key); // 从数据库中获取数据...(缓存数据删除了,所以要重新获取,执行方法体)}@Testpublic void testPut(){String key = "mengdee";ehcacheService.refreshData(key); // 模拟从数据库中加载数据String data = ehcacheService.getDataFromDB(key);System.out.println("data:" + data); // data:mengdee::103385ehcacheService.refreshData(key); // 模拟从数据库中加载数据String data2 = ehcacheService.getDataFromDB(key);System.out.println("data2:" + data2); // data2:mengdee::180538 }@Testpublic void testFindById(){ehcacheService.findById("1"); // 模拟从数据库中查询数据ehcacheService.findById("1");}@Testpublic void testIsReserved(){ehcacheService.isReserved("123");ehcacheService.isReserved("123");}@Testpublic void testRemoveUser(){// 线添加到缓存ehcacheService.findById("1");// 再删除ehcacheService.removeUser("1");// 如果不存在会执行方法体ehcacheService.findById("1");}@Testpublic void testRemoveAllUser(){ehcacheService.findById("1");ehcacheService.findById("2");ehcacheService.removeAllUser();ehcacheService.findById("1");ehcacheService.findById("2");// 模拟从数据库中查询数据
// 模拟从数据库中查询数据
// UserCache delete all
// 模拟从数据库中查询数据
// 模拟从数据库中查询数据}}
示例Demo代码下载:http://download.csdn.net/detail/vbirdbest/9852783
参考文章: http://www.cnblogs.com/jingmoxukong/p/5975994.html
ehcache入门基础示例相关推荐
- GSAP动画库入门基础示例:心爱的小摩托
大家好,在我们谈论网页动画时,我们第一时间会想到用jQuery的animate()方法或者CSS3的animation和transition.今天的这篇文章,我将给大家推荐另一个可选方案,一款专业的W ...
- Membership三步曲之入门篇 - Membership基础示例
Membership 三步曲之入门篇 - Membership基础示例 Membership三步曲之入门篇 - Membership基础示例 Membership三步曲之进阶篇 - 深入剖析Pro ...
- java入门基础知识示例代码
本次更新给大家带来java的入门基础知识相关学习代码 模块一:java程序里的数据书写格式 package com.jiawei.literal;public class LiteralDemo {p ...
- python编程语法大全-Python编程入门——基础语法详解
今天小编给大家带来Python编程入门--基础语法详解. 关于怎么快速学python,可以加下小编的python学习群:611+530+101,不管你是小白还是大牛,小编我都欢迎,不定期分享干货 每天 ...
- python编程语法-Python编程入门——基础语法详解
今天小编给大家带来Python编程入门--基础语法详解. 一.基本概念 1.内置的变量类型: Python是有变量类型的,而且会强制检查变量类型.内置的变量类型有如下几种: #浮点 float_num ...
- python编程if语法-Python编程入门基础语法详解经典
原标题:Python编程入门基础语法详解经典 一.基本概念 1.内置的变量类型: Python是有变量类型的,而且会强制检查变量类型.内置的变量类型有如下几种: #浮点 float_number = ...
- python编程语法-Python编程入门——基础语法详解(经典)
今天小编给大家带来Python编程入门--基础语法详解.温馨提示: 亮点在最后! 在这里还是要推荐下我自己建的Python开发学习群:301056051,群里都是学Python开发的,如果你正在学习P ...
- 大数据入门基础系列之初步认识大数据生态系统圈(博主推荐)
不多说,直接上干货! 之前在微信公众平台里写过 大数据入门基础系列之初步认识hadoop生态系统圈 http://mp.weixin.qq.com/s/KE09U5AbFnEdwht44FGrOA 大 ...
- NSubstitute完全手册(一)入门基础
NSubstitute入门 最简单的入门方式就是创建一个测试项目,并将 NSubstitute 引用到其中.可以通过 NuGet 或 OpenWrap 来获取 NSubstitute 包.也可以直接下 ...
最新文章
- 页面切换语言包使用session不用cookie
- matlab在图像调用Gabor滤波
- pytorch学习知识点总结
- Socket之TCP服务器【Python】
- python读取数据流_python3+pyshark读取wireshark数据包并追踪telnet数据流
- angular 权限 php,PHP,Angular,HTACCESS-仅允许来自源域的请求
- 如何重启_消费市场按下重启键,企业该如何提前布局
- 【问题汇总】Ubuntu使用常见问题
- linux命令stat,查看文件详细信息
- excel数据导入到 mysql 中
- 【C语言】08-数组
- 【编程知识】常用参考表对照表
- Nebula Graph - 集群模式部署
- 六级阅读翻译——2017.11.13
- 天天果园成为Zespri 佳沛奇异果直接经销商
- 移动端小场景优化方案
- 第一周,人工智能学习总结
- 数据库唯一性约束(Unique Constraint)
- 谷歌手表android wear2,Android Wear 2.0正式发布:将谷歌助手放进你的手表
- kill word fore out
热门文章
- Prism 文档 第三章 管理组件之间的依赖关系
- 验证选择每日学习总结:DropDownList是否已选择验证、存储过程参数为sql字符串问题、将截断字符串或二进制数据。\r\n语句已终止...
- 软件推荐:Microsoft To-Do
- PHP正则匹配6到16位字符组合(且只能为数字、字母、下划线)
- RocketMQ源码学习(六)-Name Server
- Centos 7系统目录结构
- Codeforces 57C Array dp暴力找到规律
- 【不积跬步,无以致千里】linux下如何查看自己的外网IP
- Qt4 QRadioButton和QCheckBox用法示例
- 【辨异】inverse, reverse, converse