First, Introduction
very simple, and easy to use.
Ehcache is a very lightweight cache implementation, and it supports the cluster since 1.2 and is the default cache provider for hibernate. Ehcache is a pure Java in-process caching framework, which is fast and capable, and is the default Cacheprovider in Hibernate.
Ehcache can be used directly. It can also be u
'");Query.setcacheable (TRUE);listSystem.out.println (list+ "" +list.get (0));Session.close ();*//*** For a one-to-many relationship just cache the order to level two cache, where the multiparty item is not cached (Modify config *//* Session session = This.getsessionfactory (). Opensession ();Transaction tran = Session.begintransaction ();Order order = (order) session.load (Order.class, "4028aabe4b486f83014b487030820001");System.out.println (order+ "" +order.getid () + "" +order.getitems ());Tr
: System Urban regional model, such as: national, provincial, municipal, county and county maintenance.4. Menu Management: Configure the System menu, Operation permissions, button permission identification and so on.5. Role Management: Role Menu permission assignment, set role to divide data range permissions by agency.6. Dictionary management: Maintenance of some of the more fixed data commonly used in the system, such as: whether, gender, category, level, etc.7. Operation log: System normal op
maintenance.5. Role Management: Role Menu permission assignment, set role to divide data range permissions by agency.7. Operation log: System normal operation log record and query, system exception information log record and query.9. Workflow Engine: Implement business order flow, online process designer.1.Eclipse IDE: Using MAVEN project management, modular.Technology selection (only part of the technology is listed)Service Framework: Dubbo, Zookeeper, rest servicesMessage middleware: ActiveMQ
Add toXML File ErrorError:The prefix "cache" for element "Cache:annotation-driven" was not bound.Solve:Add red and bold contentXmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"xmlns:tx= "Http://www.springframework.org/schema/tx" xmlns:jdbc= "Http://www.springframework.org/schema/jdbc"xmlns:context= "Http://www.springframework.org/schema/context"Xmlns:mvc= "Http://www.springframework.org/schema/mvc"Xmlns:cache= "Http://www.springframewor
MetronicClient authentication: Jqueryvalidation Plugin.Rich Text: CkecitorFile Management: CkfinderDynamic tab: JerichotabData table: Jqgriddialog box: JQuery jboxTree structure controls: JQuery ZtreeOther components: Bootstrap 4 metronic3. SupportServer middleware: Tomcat 6, 7, Jboss 7, WebLogic 10, WebSphere 8Database support: Currently only support MySQL database, but not limited to the database, the next version of the upgrade multi-data source switching and database read and write separati
Framework introduction-mainly located in the Internet Enterprise architecture, has built-in enterprise information system basic functions and efficient code generation tools, including: System permissions components, data rights components, data dictionary components, core tool components, view operations components, workflow component components, code generation, and so on. Adopt layered design, double authentication, submit data security code, password encryption, access authentication, data p
Today found a development project started with a warning prompt: Cache ' xx ' is set to eternal but also has Ttl/tti set, found to be ehcache cache settings conflict
So decided to mark it here, to deepen the memory, specifically as follows:
Timetoliveseconds: Cache from the time of creation to the expiration of the time unit of seconds, the default is 0, representing an infinite length, that is, the cache never expires;
Timetoidleseconds: After the
Monitor ehcache cache:
1. Download:
Http://terracotta.org/downloads/open-source/destination? Bytes2. extract to the directory, copy the ehcache-monitor-kit-1.0.0 \ Lib \ ehcache-probe-1.0.0.jar package to the/lib directory of the application 3. configure copy ehcache as follows. Http: // localhost: 9889/monitor/to st
Introduction and use of ehcache
Combined with spring, ehcache
Cache main annotation usage:@ Cacheable, @ CacheEvict, @ CachePut
For more information about syntax and configuration, see the following website:
1. Very detailed use of spring mvc and cache blogs (annotation-driven Spring cache Introduction)
Http://www.ibm.com/developerworks/cn/opensource/os-cn-spring-cache/
2. Official website documents
attribute, and the least hits value is cleared out of the cache. LRU, Least Recently used (least recently used). (ehcache default). The cached element has a timestamp, and when the cache is full and you need to make room to cache the new element, the element with the time stamp in the existing cache element that is farthest from the current time is cleared out of the cache. -EhcacheXmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:nonam
, primarily using Hibernate's Level two cache (always open the query cache at the same time) using spring's AOP annotations can be easily done, and in other query methods, the main use is Ehcache, used to cache the various objects returned by the method. It is easier to open Hibernate's query cache and level two cache. Do not introduce too much here, we mainly look at the use of Ehcache method.1. First we u
, such as: financial data [3] may be modified by other applications
2.Survey project suitable for storing data in level two cache ① the Res object queried when verifying permissions
Res Getresbyservletpath (String servletpath);
② participation in survey related methods
engageservice.pageinfo
3. Using the spring-provided caching abstraction mechanism to integrate the Ehcache① of pseudo-code to demonstrate how a cache slice work
Ehcache is a distributed cache framework that is the default implementation of level two cache in Hibernate.One, the idea of integrationMyBatis provides a cache interface, if you want to implement your own cache logic, implement the Cache interface development:MyBatis and Ehcache Integration: the implementation class for the cache interface is provided in the integration package for MyBatis and
Add Ehcache Dependency package in 1.pom.xml2. Add ehcache configuration file under Classpath ehcache.xml3.spring configuration file Applicationcontext.xml need to be aware of adding red italic Partial configurationXmlns:cache= "Http://www.springframework.org/schema/cache" xsi: schemalocation= "Http://www.springframework.org/schema/cache http ://www.springframework.org/schema/cache/spring-cache-3.2.xsd" >4
Configuration of Ehcache in load balancing
Two machines (TOMCAT1 and TOMCAT2) did a load balance, with the Ehcache, Usercache and Resourcecache, the problem arose, the user registered in the TOMCAT1 can not log on the TOMCAT2, Later I modified the Acegi settings, so that users do not read data from the Usercache when logged in, but from the database to obtain data, but the problem then appeared, on the
If you read my previous (35) article this article will be very simple, no challenge.
So let's first talk about this article we will learn the technical point: Spring Data jpa,spring Boot using mysql,spring mvc,ehcache,spring cache, etc. (where @cacheable see a section of theoretical knowledge), Here are a few steps:
(1) New maven Java Project
(2) Adding a dependency package to the Pom.xml
(3) Write spring boot boot class;
(4) configuration application
1 LearnPlan1. Role ManagementN Add Role FeaturesN Role Paging Query2. User ManagementN Add User FeaturesN User Paged Query3. Modify The authorization method in Realm (query database)4. Use ehcache to cache permission dataN Add ehcache dependencyn Configuring the Cache Manager5. Thesystem menu is displayed according to the login.n Adjust page Ajax request AddressN Server-side Query menu data2Role Management
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.