Hibernate/Spring Cache Integration

Integration for org.springframework.cache.Cache into Hibernate as a second-level caching service

License

License

Categories

Categories

Hibernate Data ORM
GroupId

GroupId

com.integralblue
ArtifactId

ArtifactId

hibernate-springcache
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Hibernate/Spring Cache Integration
Integration for org.springframework.cache.Cache into Hibernate as a second-level caching service
Project URL

Project URL

https://github.com/candrews/hibernate-springcache
Project Organization

Project Organization

jcabi.com
Source Code Management

Source Code Management

https://github.com/candrews/hibernate-springcache

Download hibernate-springcache

How to add to project

<!-- https://jarcasting.com/artifacts/com.integralblue/hibernate-springcache/ -->
<dependency>
    <groupId>com.integralblue</groupId>
    <artifactId>hibernate-springcache</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.integralblue/hibernate-springcache/
implementation 'com.integralblue:hibernate-springcache:2.0.0'
// https://jarcasting.com/artifacts/com.integralblue/hibernate-springcache/
implementation ("com.integralblue:hibernate-springcache:2.0.0")
'com.integralblue:hibernate-springcache:jar:2.0.0'
<dependency org="com.integralblue" name="hibernate-springcache" rev="2.0.0">
  <artifact name="hibernate-springcache" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.integralblue', module='hibernate-springcache', version='2.0.0')
)
libraryDependencies += "com.integralblue" % "hibernate-springcache" % "2.0.0"
[com.integralblue/hibernate-springcache "2.0.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.hibernate : hibernate-jcache jar 5.3.3.Final
org.springframework : spring-context jar 4.3.6.RELEASE
org.springframework : spring-orm Optional jar 4.3.6.RELEASE
org.springframework.boot : spring-boot-autoconfigure Optional jar 1.4.2.RELEASE

test (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-test jar 1.4.2.RELEASE
org.hibernate : hibernate-testing jar 5.3.3.Final

Project Modules

There are no modules declared in this project.

Hibernate SpringCache

DevOps By Rultor.com Build Status Maven Central Reference Status Dependency Status Javadoc Quality Gate

Hibernate SpringCache is a Hibernate cache implementation that backs to the Spring Cache abstraction. In other words, setup caching once in Spring then use it from Spring and Hibernate so configuration isn't duplicated.

This project has been submitted to Hibernate for inclusion: https://github.com/hibernate/hibernate-orm/pull/1639

Quick Start

  • Minimum requirements — You'll need Java 1.8+, Hibernate 5.3.3+, and Spring 4.3+. Spring Boot 1.4+ is optional. Use version 1.x of this project for Hibernate 5.2 support.
  • Download — Depend on this libary using, for example, Maven:
  <dependency>
    <groupId>com.integralblue</groupId>
    <artifactId>hibernate-springcache</artifactId>
    <version>[INSERT VERSION HERE]</version>
    <type>jar</type>
  </dependency>
  • In application.properties, add: spring.jpa.properties.hibernate.cache.region.factory_class=com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactory
  • If using Spring Boot, that's it - com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryAutoConfigure will take care of the rest.
  • If not not using Spring boot, the com.integralblue.hibernate.cache.springcache.SpringCacheRegionFactoryBeanPostProcessor bean post processor must be registered (add it as a bean using Spring Java or XML configuration).

Versions

Version
2.0.0
1.0.2
1.0.1
1.0.0